How to hide files in JPEG pictures
Posted on April 16, 2008 at 5:34 am
If you’re looking to hide files on your PC hard drive, you may have read about ways to encrypt folders or change the attributes on a file so that they cannot be accessed by prying eyes. However, a lot of times hiding files or folders in that way requires that you install some sort of software on your computer, which could then be spotted by someone else.
I’ve actually written quite a few articles on how you can hide files and folders in Windows XP and Vista before, but here I’m going to show you a new way to hide files that is very counter-intuitive and therefore pretty safe! Using a simple trick in Windows, you can actually hide a file inside of the JPG picture file!
You can actually hide any type of file inside of an image file, including txt, exe, mp3, avi, or whatever else. Not only that, you can actually store many files inside of single JPG file, not just one! This can come in very handy if you need to hide files and don’t want to bother with encryption and all that other technical stuff.
Hide File in Picture
In order to accomplish this task, you will need to have either WinZip or WinRAR installed on your computer. You can download either of these two off the Internet and use them without having to pay anything. Here are the steps for creating your hidden stash:
- Create a folder on your hard drive, i.e. C:\Test and put in all of the files that you want to hide into that folder. Also, place the image that you will be using to hide the files in.
![]()
- Now select all of the files that you want to hide, right-click on them, and choose the option to add them to a compressed ZIP or RAR file. Only select the files you want to hide, not the picture. Name it whatever you want, i,e. “Hidden.rar”.
![]()
- Now you should have a folder that looks something like this with files, a JPG image, and a compressed archive:
![]()
- Now here’s the fun part! Click on Start, and then click on Run. Type in “CMD” without the quotes and press Enter. You should now see the command prompt window open. Type in “CD \” to get to the root directory. Then type CD and the directory name that you created, i.e. “CD Test“.
![]()
- Now type in the following line: “copy /b DSC06578.JPG + Hidden.rar DSC06578.jpg” and press Enter. Do not use the quotes. You should get a response like below:
![]()
Just make sure that you check the file extension on the compressed file, whether it is .ZIP or .RAR as you have to type out the entire file name with extension in the command. I have heard that some people say that they have had problems doing this with a .ZIP extension, so if that doesn’t work, make sure to compress to a .RAR file.
And that’s it! The picture file will have been updated with the compressed archive inside! You can actually check the file size of the picture and see that it has increased by the same amount as the size of the archive.
You can access your hidden file in two ways. Firstly, simply change the extension to .RAR and open the file using WinRAR. Secondly, you can just right-click on the JPG image and choose Open With and then scroll down to WinRAR. Either way, you’ll see your hidden files show up that you can then extract out.
![]()
That’s it! That is all it takes to hide files inside JPG picture files! It’s a great way simply because not many people know it’s possible and no one even thinks about a picture as having to the ability to “hide” files. Enjoy!
[tags]hide files, hide file in picture, hide file in pictures, hiding files in pictures, hide file in image[/tags]
» Filed Under Computer Tips
Related Posts
- Another way to hide files and folders in Windows XP
- How to hide files and folders in Windows XP – The easy way
- Hide Files in JPEG Pictures the Easy Way
- How to create a secured and locked folder in Windows XP
- How to create an "Invisible" hidden drive in Windows
Comments
118 Responses to “How to hide files in JPEG pictures”
-
Pingbacks
-
How to Protect and Lock Folders in Windows Says:
[...] Hide Files Inside JPEG Images [...]
December 8th, 2009 at 5:44 am
Pingbacks
-
Hide Files in JPEG Pictures the Easy Way Says:
[...] couple years ago, we discussed how to hide files in JPEGs. The method we discussed worked well, but many novice computer users may feel more comfortable using [...]
July 7th, 2010 at 5:42 am
There in fact is a problem with Winzip on reopening the jpeg file – so Winzip doesn’t work.
I tried 7-zip and it works – both zip and unzip. Thanx for this simple DOS tip.
Hi Jimmy, thanks for confirming. I tried and it had some issues, but I thought it could be a problem on my side. Guess not! Good to know that 7-zip works also..anyone else try a different zip program, then let us know if it works.
Neat trick. Worked just fine for me using using WinZip. I was able to open the jpg archive using the “Open With” function. Thanks.
Hey, Jimmy, how exactly did you get this to work with 7-zip? I’ve tried and tried and haven’t been able to split the files. My process(es) have been 1) change extension to .7z or .zip (tried both ways) to which I got the “invalid archive” error prompt 2) open with gives the same.
Any suggestions on that one?
It will work fine with WinRAR
works great, love the idea. tried with winzip. Don’t forget the /b switch in the copy cmd, without it I got a can’t open zip file, with it works like charm.
If you are using a NTFS file system you should look at Alternate Data Streams also.
Something like this for Linux? thanks.
@xumxum
The reason it doesn’t work without the /b is because otherwise it is just the regular copy command. /b signifies creating a new file whose contents are those of the two (or more) combined.
@Juan
This is actually just a concatenation of two files.
Linux has a command cat to do just that:
$> cat f1 f2 > f3
I assume the reason this works is because the JPEG ends before the RAR starts:
The file contents are something along the lines of:
JPEG header
JPEG data
JPEG end
+
RAR header
RAR data
RAR end
The graphics program reads until the JPEG ends, and the RAR program searches for the RAR header and reads from there. Whether or not the de-compressor searches for the header (and doesn’t just start at the beginning) determines whether or not the file can be read.
I may be wrong though.
Always new that was possible… I never knew how, i just had to Un-encrpt (?) a file because there was a virus encrypted the same exact way to an installation file. devils.
@Peter
I think its
JPEG header
JPEG data
JPEG end
+
RAR end
RAR data
RAR header
Great tip BTW. Works great with 7-zip
If anyone makes changes to the .jpg file using MSPaint, anything you attach to the end of the .jpg gets wiped out.
However, I was wondering if .mpg, .wmv, and .avi files might show promise instead of .jpg files.
I used this trick for a mystery GEO-CACHE in my area. (I hid the coordinates as a text file inside a jpg picture filled with numbers, people are looking for patterns in the image even though it has nothing to do with it!)
People are having a hard time decoding it.
Thanks!
yeah this works man..
and this is very simple..
thanks!
Pretty nice trick! Works with WinRAR.
This is brilliant! Alternate Data Streams being put to awesome use!
I believe the /b is for binary, instead of text. That way it will use what is already there and not misinterpret unprintable chars or otherwise make changes.
I just had a sick idea. Would this work as a way to share files online? You could upload the image to imageshack or whatevs, and others could dl the file.
I can confirm that my technique does in fact work. Damn, I’m good.
This even works with exe files. I tried
C:\>copy /b bang.jpg + pu.exe some.jpg
bang.jpg
pu.exe
1 file(s) copied.
now the only thing i am trying to do is figure out how to get the exe to run in the background when the jpeg file is accessed.
it wrks….
thnx a lot for sharing this…
Really cool tip. I would never have thought of that one. I guess all these other guys can’t say thanks and would have thought of it.
Nice trick…
there is a easier way to hide files if you dont want to put them inside a jpeg and only want to hide them.
1. just put the files in a rar archive and enable password and encrypted file names in advanced tab. so nobody can see even the names of the files you want to hide.
2. then you can change the extension (maybe to .dll and put it in windows/system32 folder nobody will find them)
Has anyone successfully executed a .exe or .bat in the background while opening the picture?
This could be an awesome prank to hide a shutdown command inside the picture xD
hello.. i can’t get it right. after i finished with the copy in cmd, i tried to open my picture but it won’t open. it ‘the is either an unknown format or damaged’.
help me..
oowhh…sorry guys. my fault. it seems like larger size pictures don’t work. the first one i used was a picture with size 1600×1200. then i used a picture with size 600×900. the result is that I successfully combined and opened it using WinRar.
Thanks for the info.
If you use this technique in combination with encrypting and password protecting your archive then you can REALLY keep the files from other people. In winrar, if you dont have the password you cant even see the files. I LOVE this trick. Thanks!
Excellent. Had to send my laptop for service last week and didn’t want sensitive files visible. Since I have tons of photos on the hard drive, it was very easy to hide all those files inside various JPGs. Brilliant!!!
Dacia – It seems that Garry Glitter didn’t know about this trick.
If I wanted to hide pictures or anything else I would simply create a partition and hide it using Partition Magic.
As long as you don’t need to access it too often as it requires rebooting to view it.
If just a few pictures then use the old addage “the best place to hide an elephant is in a herd of elephants”. Simply alter the file extension to .dll and save it in the system directory.
Is there a way to divide those files back?
Don’t forget to delete the originals after, or they’ll all still be in the folder together with the new file
Hi there, I can see only one problem with this method and that is that people usually become very suspicious of a jpeg file that is over 10 MB or so.
I think it would be better to edit the first few seconds out of an avi file which is, for example part of a tv series and make it look like it is just another episode.
This way you can have the file just about any size that you want with out raising suspicion as video files can easily be just about any size.
I made a zip file using TugZip and it worked perfectly fine. p.s. i recommend tugzip
great program!
Actually, there are applications you can use to hide files which are not so obvious to other users. Secondly you can develop your own program using Visual Basic as I have, that is your best bet since whatever you create will not be a commercial software.
Ultimate Anonymity ( http://www.ultimate-Anonymity.com ) offers a super cool program that will let you hide files within images.
Nice tip! Something to add is that if you don’t want to type the entire name of the archive or image the cmd prompt does support tab completion so you can type dsc and press tab and windows will fill out the rest of the characters. However, If you have several pictures in one folder you will need to narrow it down by typing more of the file name before pressing tab.
Nice tip. Some people mentioned ADS [alternate data streams] as an alternative, but keep in mind they do not retain the alternate streams once sent across the Internet. At least this was the case last time I checked, but it has been a while since I have used Windows.
I used truecrypt to encrypt mmy files in AES/Sperpant/ and Twofish, in a cascade, then put them in the .jpg file. haha even the CIA would have a field day trying to figure that one out. Since both files combined are 5mb
Confirmed it works in WinRAR with smaller .jpg sizes, but not with large .jpg sizes (1700×2338 size .jpg did not work).
You can do this in Linux the same way.
1. Create the rar file
2. Do: $cat foo.jpg bar.rar > new.jpg
You get a jpg image. To get your files do
$rar l mypic.jpg
$rar e mypic.jpg
now i’m all paranoid… if i wrote this article i would have hidden files in all the screenshot PNGs.
great article. thanks.
This is much akin to gluing your copy of Playboy to the back of PC Weekly and hoping no-one reads past page 182.
All I can say is… can I borrow last weeks copy of PC Weekly?
PowerArchiver confirmed to work.
Very cool!
Here’s instructions for Linux users:
zip archive.zip file.to.hide1 file.to.hide2 …
cat image.jpg archive.zip > image2.jpg
# to replace the original image
mv image2.jpg image.jpg
# image still works as an image
display image.jpg
# To get hidden files back
unzip image.jpg
Is this how viruses can get in over port 80 from a website? I don’t know how they’d “run,” but I can see how they get in.
DEADcamel has a good point… a jpeg that’s too big is suspicious. I tried this technique with a WMV file however and it worked perfect. WMV still played in media player fine, and 7-zip still opens the file as an archive fine too.
Any ideas how to do this with terminal in os x?
OSX will work the same as Linux
If you really want to hide something, you have to use steganography (http://en.wikipedia.org/wiki/Steganography) combined with encryption.
The above method is very weak.
I have my folder (with image and txts) in an external hard drive. How would I access the root directory in the command prompt? F Drive, for instance.
- Absolutely fantastic -
Actually you can hide any type of file inside any other type of file, not just JPG.
I’ve just added a rar file to a small exe application…and the application works fine after the process! Also, changing extension from exe to rar will open the compressed file inside the exe!
bye
@Robert Sander: Yes, this is a very weak way to hide a file, from the point of view of a computer power-user. This method will work, however, against less experienced and knowledgeable users.
If you really want to hide something from someone using this method as part of your steps, you’re going to want to encrypt and password-protect the files as well. There were some suggestions in previous comments about using the features of WinRAR. I think that’s good advice to cover yourself fully.
Hello,
The command appeared to work but it came back with “Access Denied”. I think my Administrator Settings may be wrong but I’m not sure. I also don’t know how to change them. I’m using Vista. Can you help?
Thanks a lot, real cool tips! It works for me, I use WinRAR.
@Tux: So, it seems you are a power user then. My question is: Do you keep checking exe files (and other file types) to see if there is something hidden inside of it? Maybe not, I guess.
we are talking here about a simple way to do that, so for the power-users that want encryption and other “advanced” options, this is not he right place to comment.
Finally if you are going to add encription and password protection to the file, so there is no need to hide anything inside a JPG file at all, just zip the file and add the password…I think average users know that already.
So my conclusion is: This blog (or whatever) is about “How to hide files in JPEG pictures” nothing else…and I think the site has achieved what is expected for it.
awesome tips with amazing tools.
WIN ZIPith and open?
sooo u used winzip.
your file looks a little diffrent once made than Hidden.rar
to be sure first check the image size.
then run the command as follows:
cd \
cd Test
copy /b DSC06578.JPG + Hidden.rar DSC06578.jpg
This is all still the same up until it is time to open it.
First make sure the file has gotten bigger.
Now open CMD back up as before and run these commands:
cd \
cd Test
unzip DSC06578.JPG
The files are now open.
hey its working fine but how do I get the EXE file back out of the JPEG and run it!?
Is there any other file type you can do this to other than jpegs?
Oh! Surprise…I had never thought to hide files like that. I really want to thank you!
awesome tool. but how do i undo it to get back the original jpg file size? forgot to make a copy of the original jpg file.
This will not work for “certain” images… There is a common chance that certain images contain what looks like PK or ZIP or RAR data. These specific images will give you the results you see with errors.
Unfortunately, it is a matter of trial and error. Don’t assume this will work with every 800 x 600 image, because it worked with another one. It depends on the contents of the image.
For those who know about reading headers, you can simply look for a binary match of any ZIP header in the file. Abort the use of that image if it does contain the same sequence of header info.
There is actually a program that is also an image, and even a long, “Primary number” that is also a program too. (Just requires notepad to make the program with that primary number.)
That is a good way to cause all sorts of trouble… just rename all your files to EXE and try to run them! LOL.
Try unzipping some of your images that don’t have zips added to them. Many will actually unzip, but contain garbled files and data. Don’t use those for zipping, or you will be in for a real unwanted surprise!
hey this is an awesome way to hide files. One problem, how do i extract the files from the image to be able to use them again, i tried the command – from above to open them, but ‘unzip’ is not recognised by windows as a command.
Grateful for your help.
So…this is a great technique if you would like to hide small files..however larger files..not such a good idea. It becomes quite obvious when you have a 12MB jpeg file. There is something simple you can do using winrar to hide larger files. pack your file into a .rar file..make sure to use the encryption and compression features. Once the .rar file is created…simple change the extension to an extension of your choice…such as .dll.
Rename the dll file to a not so obvious name, but something easy to remember. Then simply bury the file in a folder of your choice that contains multiple dll files.. or files of they type of extension you named. So not only would the person have to know the file name…and that the dll file is really not a dll file..but they would also have to know what to change the extension back to…AND then they would also need to know the password to unpack it. Have fun!
Thanks for sharing, It is a neat trick.
For all those asking about more security, either don’t have the sensitive material on that comp or else burn or transfer to flash drive and hide behind the pic of your grandmother.
…Or you can just use this nifty utility Concealar to hide files:
concealar.googlepages.com
thanks for the trick … but i can’t see the picture after the hiding of the file … it says no preview available
awesome trick,i just love it and its not just with this post i love each and every post of yours.
thank you
Great suggestions and examples, especially for a newbie like myself who lacks a natural sense of web design.
oh..!!..That a serious trick..!!..Loved it ..! its very good trick to hide your important doc’s in a jpg..!
if worried about file size, you could always hide the file in a working photoshop pic/file which would account for having a lager file size
thanks for this article about hiding files inside pictures, after surfing the net for a long time, I found what I wanted. thanks again.
Its a great trick…!!!
This can be used to attach EXE files hidden behind an image and then send it via GMAIL… which don’t allow sending of EXE files through the mail!!
This is a good idea. I have another, this only works in windows. First, in windows go to ubuntu.com and download the iso. after it is done downloading, burn it to cd at the lowest burn speed. after it is done, restart the computer with the newly burned disk in the drive. Right at POST press to bring up the boot manager select the cd drive. at the next screen just press twice.
Once you are in linux, mount the drive with your hidden files on it. Go to the folder called: System Volume Information, and make a new folder called hidden. go to where your files and press and go back to your hidden folder and press . Restart the computer with the disk put away in a safe place, and try to open the System Volume Information folder in windows, guess what? You can’t!
The folder has the file record on it. As long as you don’t mess with any files other than your own in that folder, your files will be uncorrupted. Don’t let anybody use the disk that you made, though because it has the power to look at the files that you want hidden.
Thanks i could not do it with winRAR but it worked with 7-zip thanks a lot for the tip
:D:D:D:D
I’ve got problem with WindowsRar and the .rar format but I packed Hide.rar in the .jpg and renamed it to .7z and it work like a charm!
This is the coolest trick I have ever heard of!! Thanks for sharing man…
Can anyone tell me how to execute .exe in the background while opening the picture?
This is NOT an awesome trick and is a lame brained attempt to hide files from, say, the cops or any computer security types, such as Joe Blow down at Compu Shack. Might keep them from prying eyes at home tho.
Just use Truecrypt and you are done. If you are serious about them never being found by anyone ever, then read the tips from Truecrypt RE Plausible Deniability
I agree with Gorby, hiding files inside pictures is not really a great way to hide stuff. Yes, most non-techie people will never be able to find it, but anyone with some skills could easily extract the files from the images.
Hello, I have been working with the computers for the last 15 years, but you taught me things that I would have never imagined. Hats off to you… Keep up the good work.
Nice trick, never knew you could hide files in images.
The Ultimate Anonymity software referenced in post #37 is sweet. I have been using it for some time as well as other file hiding software they provide.
does it have to be in the C folder?
There is a utility to do this at concealfiles.com. It’s not free, but good for all the non-techie people out there who can’t hide the files in JPEGs themselves.
HI
Anyone know how to get the exe file to run in the background when the jpeg file is accessed???
This is a neat tip for small files but for larger files its a fail. Most people know jpegs are small file sizes, so hiding larger files sort of gives it away. If there was a utility that could report the jpeg as the original size then it would be a cool and viable option.
Anyway, its still a cool trick and very easy to implement, so thanks for the tip.
Every time i try to do it no matter what i always get “the system cannot find the file specified” any reason that is?
Excellent ! working fine with .rar
Haha what an awesome trick! I’ve never heard of that and it’s so simple! Thanks for posting, I’m adding this to my RSS feeds!
HI
Anyone know how to get the exe file to run in the background when the jpeg file is accessed???
wow good stuff,. will I be able to extract the content if I put the jpg image on the web and then download it at my home pc ?
thank you
JPG, not JPEG.
I meant that JPEG is not JPG, just to clarify. It’s because I noticed some of you had problems and this could well be the problem.
thanx…but I can’t see my file hidden in the picture…rather it is in my winrar folder
can u plz tell me y is it so??
I have a question.
If i put a keylogger inside the JPEG, will it work?
I mean if the victim will open that hidden file he will have a keylogger inside the PC, so i can see the keystrokes?
I seem to be able to do this with 7-Zip but not WinRar, also I cannot add files once the file has updated.
Any suggestions?
@Fake: Go away and try learning something positive in life other than to be a thief or a snoop. I deal with wannabe hackers all the time and it gets sooooooooooooo boring having to teach you erks a lesson in social etiquette.
Start to learn some respect for peoples privacy, and please, don’t go all moralistic on me trying to justify your actions.
Thanx a lot…it worked great! I was able to hide several files in one JPG image.
How to open the file once it has been hidden?
Shukoor… did you even read the article? /facepalm
OK SO, obviously this can be used to hide any file inside of any other file, but the fact that the jpg still works as a picture is the great part.
That said, I experimented around after seeing someone ask about using an avi file since they are large to begin with. After about five minutes I discovered the following:
Running the following command hides the file as expected however the avi video will not play and the rar archive is not accessible.
Doesn’t work: copy /b movie.avi + filetohide.rar movie.avi
——
However (and this is the great part) this command:
copy /b filetohide.rar + movie.avi movie.avi
Does work! This file successfully extracts from winrar and also plays the video and audio flawlessly.
on the CMD part, when I placed the *.rar first, the jpg didn’t work and the hidden files did.. when I placed the *.jpg first the picture worked but the hidden files didn’t.
Instead of using paid software like WinRar, one can use freeware like IZArc2Go. I know that many people prefer use pirated copies of WinRar, so its better not to use WinRar. But if You are using, WinRar or other softwares like Peazip or 7-zip no need to worry, download portable version of IZArc2Go. It works , I tried it with zip files. Remember “7z” achives better compression than “rar”!
I’m having a similar problem to someone in a previous post. Either the picture works when I do the following:
copy /b testpic.JPG + hidden.rar testpic.JPG
or the archive works when I do the following:
copy /b testpic.JPG + hidden.rar hidden.rar
I’m using Windows 7. Would that be the cause of the problem? I’ve also tried a few other combinations that give me errors when I try to extract the files. I also tried like an above example suggested, using different sized images. I’ve tried big and small, and I get the same results.
Any advice or ideas on how I could get this trick to work would be greatly appreciated.
Thanks.
It says: “To get your rar file, just change the extension .jpg of picture.jpg to .rar , and open it. To hide, change the extension back to .jpg.”
I’m wondering: Once you created your hidden picture file, how do you edit and add new info, i.e., MS Word docs, notes, mp3s, etc., and put the new info back in the hidden picture without going through all those steps again?
Thanks.
I tried this:
C:\>copy /b some.jpg + movie.avi other.jpg
It works.
Problem: not able to see movie even after changing the extension of image file to .avi.
Hey, thanks! Just what I was looking for! I tried it and at first it said “The system cannot find the file specified.”
So, I had thought maybe this guide was outdated, seeing the top comments were in 2008 and I’m using Windows 7, which didn’t exist when this instructional was created. I looked over and yes, I had typed it correctly.
However, it turns out that I thought to shorten the filename and remove the numbers and underlines in between words. I made the jpg file to be four letters long.
It worked! The command prompt listed the image name on the next line (after pressing Enter), then, on the next line the .rar file (which is 1GB large!), and, then, after a moment, it said “1 file(s) copied.”
Thanks for the guide!!! =)
Hi,
Is their a way to reversed the process? i try to hide my files but before archiving it, I put a password on the archive and hide it on image..now the problem is when i open it on Winrar I can open the archive but i can’t extract it and giving this error..
“! D:\test.rar: CRC failed in the encrypted file D:\test.rar (wrong password ?)
! D:\test.rar: No files to extract”
I swear the password is correct since i was able to view the archive..i just can’t extract it…:(
any help will be appreciated..
TIA
as you may/or may not know JPEG is a lossless format thus the important question here is there; 1)likely to be degradation when it comes to uncompressing and retrieving files/folders, hidden/backed-up files/data in this way and 2)is it possible to have a series of batched jpeg files which fall just under the 100MB limit set by those who’ve been flicker’ed? ‘:-)?
PS: 3) is there a better alternative/compression to JPEG which flicker might accept?
@luckynos7: Jpeg is a lossy format not lossless, the only real alternative to jpeg would be PNG its a lossless format and has the added bonus of being able to retain transparency. I use it pretty much all the time. PNG files are considerably bigger than jpeg for obvious reasons but at least you retain all the image, so its a pay-off small size and degraded image, larger file size and good quality image.
2) is it possible to have a series of batched jpeg files which fall just under the 100MB limit set by those who’ve been flicker’ed? ‘:-)?
I don’t get what you mean by this please explain more…!
it works ..thnx man !! although i did come across a problem when i used a picture of larger size in encryption (the new image won’t open up with winrar after encryption) ..but it worked for an image of small size
thnx a lot
OMG i was sitting and watching TV and just thought, i wonder if i can hide files inside files, and this is where i ended up, i kinda feel like a genius now. LOL