I got the idea to have a secret compartment in a hat from an episode of Survivorman where a guy pulls a hook and line out of the zippered compartment on his hat. I tried looking online to buy one for myself but didn't have much luck finding any so I decided it was time to make one.
Making the hat is very easy, it's deciding what to stash in the zippered compartment that's the hard part. I put all kinds of survival gear in mine like a fishing hook, line, matches, pocketknife, sunscreen packet, etc. I also add a length of paracord around the hat as Stormdrane teaches in his Instructable https://www.instructables.com/id/Paracord-Chain-Sinnet-Fast-Deploy-Boonie-Hatband/ .
Step 1: Materials
-a boonie hat (can be found online or from a military surplus)
-fabric (something sturdy)
-zipper (I salvaged mine from a cd case)
-any other sewing things you like to use like a threader or pins
Cut the fabric down the middle to add the zipper. Sew one side of the fabric upside-down onto the zipper so that it can be folded over to make a nice line and hide where you sewed. Repeat with the other piece of the fabric.
I added the other picture to show that I obviously can't sew but that that doesn't really matter since all stitches will be hidden.
If your hat is like mine then you'll have to sew the zippered lining onto the hat very carefully to make sure that you only go in and out of the inner layer and not the outside one so that you don't see the stitching on the outside.
If your hat has excess fabric that you can sew onto, use that to secure the zippered lining to the hat.
I don't have any pictures of how to sew the lining on because off the stitching took place inside the hat and zippered compartment so there was no way to show it. If you have trouble attaching the lining though you can sew half of it to one side of the hat (fabric upside down) and then lay that the right way over the hat. Unzip the lining so that you can reach in and work from the inside for the other half.
It can get a little tricky but it's worth it for a nicely finished product that hides any sewing mishaps you have.