Buy Me A Soda
User
- Log in
- Entries RSS
- Comments RSS
- WordPress.org
- Powered by AmazonSimpleAdmin
Deals of the Day
Why and How to Remove EXIF (Meta/GeoTag/GPS) Data From Pics
Do you have a smart-phone (or a modern camera with GPS)? Do you take pics with it? Do you ever upload them on the internet (social networking, tweeting, forums, email) or text them? Well did you know there is (probably*) hidden data in those pics that anyone could use to track your location. Scary isn’t it?! The hidden data is referred to as EXIF (or sometimes just Meta-data) and contains information like the camera make and model, the image dimensions, and yes: GPS coordinates…
I knew about this (at least to some extent), but I didn’t realize how easy it was for any individual to access that data and use it to track you down, until today. Take a look at this video:
So what to do now?!
- Well, if you’re worried about pictures you’ve already uploaded, you might consider trying to remove them or at least try to change the privacy settings to try to limit who has access to these photos.
- The next step would be to disable the geotagging feature of your camera (on the iPhone open Settings and go to “General->Location Services” and turn the Camera toggle off) so that no more GPS data will be tagged on the pics.
- Finally it’s time to remove the GPS data from existing pictures, I’ll show you how to do that next…
Removing GPS Data (Geotags) From Pictures
I’m going to show you the FREE way, but keep in mind if this scares you (we’re going to use the command line), then there are other options out there (but I don’t have time to find them for you, sorry… the command line / terminal isn’t that scary, really)…
Step 1: Install Jhead
Get Jhead and install it on your computer. It is available for Linux, Mac, Windows and even FreeBSD.
If you are using Ubuntu you can get it straight from the repositories using this command:
sudo apt-get install jheadOtherwise you will need to see the “releases” section on the main page: http://www.sentex.net/~mwandel/jhead/
Installation Help
(Note: if you installed it from the repos on Ubuntu, you can skip to the next step)
This is a command line program, there is no GUI (no point-click, no pretty pictures or icons, etc.), so you need to make it easy to access and use.
Mac OS X
If it goes anything like my download did, it might have a “.txt” extension on the end, and it will be in your Downloads folder. Do whatever you like, but I moved mine to a folder I use for command line utilities like this: /Applications/Utilities/NoGUI/ is my directory of choice. Assuming your situation is like mine, here are the commands to make the file executable, rename it, and move it to that destination:
//Open Terminal, defaults to your Home (user directory)
chmod +x Downloads/jhead.txt && mv Downloads/jhead.txt /Applications/Utilities/NoGUI/jhead
note: if you get an error about there being no such directory, then it’s because you don’t have a NoGUI folder yet, so make one like this:
mkdir /Applications/Utilities/NoGUI/now it’s not going to be much fun typing out: /Applications/Utilities/NoGUI/jhead every time you want to run the command… so let’s make an alias to simplify things. I’m going to assume you don’t have an alias for your text editor of choice yet, and I’m also going to assume you don’t care for command line / terminal editors like Vi, Vim, Nano, or Emacs, so we’ll do it the ugly way once, then we’ll go ahead and create a alias to the TextEdit as well to make this easier for you in the future.
In your terminal… you should still be at your Home (user)… run the following to backup your bash profile and open the profile (not the backup) in TextEdit:
cp .profile .profile.backup
/Applications/TextEdit.app/Contents/MacOS/TextEdit .profileNow, go to the bottom of the file and on a new line enter the following lines:
alias supertext='sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit'
alias textedit='/Applications/TextEdit.app/Contents/MacOS/TextEdit'
alias jhead='/Applications/Utilities/NoGUI/jhead'Now Save and Quit. You should now be back at the terminal. Now Quit Terminal and then Open it again. When it reopens you the new aliases should have loaded. To be sure type: alias and if it worked you will see all available aliases listed in the output. Now you can skip to Step 2.
Windows
I haven’t tested this on Windows, but there is an executable listed on the page so download it and put it in the root directory of your C: drive. If you want to set up an “alias” for it on Windows, you could try making an environment variable/path for it using the info found here. But for the rest of this guide, I’m just going to assume you put “jhead.exe” in “C:\” so for all of the commands below you will navigate to the directory where your photos are and then will run “C:\jhead.exe ” followed by the rest of the command, the path to the image will stay relative to your current directory.
Linux (other than Ubuntu)
I’ll update this later if I have time… but for now I’ll just have to assume you know how to install things on your own distribution or at least know how to look it up. Sorry.
Step 2: Remove/Modify EXIF Data From Pics
Locate the files you want to modify and then navigate there in your terminal or command prompt. (use Terminal in Linux or Mac, and use Command Prompt — cmd.exe — in Windows).
Once you have changed directory (cd
in case you forgot how and you can use ls in Linux/Mac or DIR in Windows to list the files in that directory if you want) and then test the Jhead installation and alias by testing on a photo:
jhead somePhoto.jpgIf it works you will see some output like this:
File name : somePhoto.jpg
File size : 244792 bytes
File date : 2010:06:23 03:12:16
Camera make : Apple
Camera model : iPhone
Date/Time : 2009:11:13 09:30:18
Resolution : 1200 x 1600
Aperture : f/2.8
GPS Latitude : N 00d 00.00m 0s
GPS Longitude: W 00d 00.00m 0s
======= IPTC data: =======
City : G
Record vers. : 2
Object Name : IMG_0004
Now, obviously I changed the GPS data for this example… But it’s definitely there… for now!
Please note: All of the following commands are for BATCH processing (doing multiple files at once). You may need to change the extension from “.jpg” to “.JPG” depending on your operating system and the way your files are named. As far as I know Jhead only works with jpg/JPG/jpeg/JPEG files.
If you only want to process one image at a time, just substitute the file name of that image for the “*.jpg”
Here’s the code to remove the stuff we don’t want/need
To remove the EXIF/GPS data (but keep basic info like pic size and date/time) use this:
//for Mac or Linux
jhead -mkexif *.jpg//for Windows:
C:\jhead.exe -mkexif *.jpgTo remove do the same as above AND add your own comment use this:
jhead -mkexif -cl 'Your Comment Goes Here - and Keep the Single Quotes!' *.jpg//for Windows:
C:\jhead.exe -mkexif -cl 'Your Comment Goes Here - and Keep the Single Quotes!' *.jpgIf you want to remove EVERYTHING you can and leave just the bare-minimum to display the image, use the following:
//for Mac or Linux
jhead -purejpg *.jpg//for Windows
C:\jhead.exe -purejpg *.jpgIf you are interested in other options to use with Jhead, see the full list here: http://www.sentex.net/~mwandel/jhead/usage.html
And that’s all folks!
If you have questions or run into problems, please feel free to comment below or contact me via one of the other methods listed on the Contact Page. Thanks!
Alex
Alex runs his own business designing websites and mobile apps, loves spending time with his wife and kids, and is still very much a kid at heart. He enjoys reading comic books, watching TV/Movies, playing video games, playing with action figures and Legos, and playing football and basketball.
More Posts - Website - Twitter - Facebook
19 Responses to Why and How to Remove EXIF (Meta/GeoTag/GPS) Data From Pics
Leave a Reply Cancel reply
Search This Site
Archives
- March 2013 (1)
- June 2012 (2)
- March 2012 (1)
- July 2011 (3)
- June 2011 (3)
- May 2011 (2)
- April 2011 (3)
- March 2011 (12)
- February 2011 (8)
- October 2010 (11)
- August 2010 (5)
- July 2010 (1)
- June 2010 (1)
- April 2010 (1)
- February 2010 (1)
- January 2010 (21)
- October 2009 (2)
- September 2009 (2)
- June 2009 (1)
- May 2009 (2)
- April 2009 (1)
- March 2009 (1)
- January 2009 (1)
- December 2008 (1)
- October 2008 (1)
- February 2008 (1)
- January 2008 (1)
- December 2007 (4)


I can tell you that if you upload photos to Flickr, all the EXIF/Metadata stays intact. You can hide it in the account settings, but it’s not hidden by default.
For photographers like me, being able to view the EXIF data for someone else’s photo can be helpful in learning how a shot was taken, but I can definitely see how removing GPS data, if it’s in there, can be a very good thing from a security standpoint. That said, I tend to map all my photos, no matter where they were taken, as a lot of times it can help other photographers find good locations to shoot. I decided against hiding location data for photos, since all the information someone would need to track me down is out on the internet regardless of whether I’ve done anything online or not.
Thank you for your feedback Brian. I agree, EXIF/Metadata can be very useful, especially for photographers. I think if I were into photography I would do the same for some/most photos I’d upload, but I’d want to keep the GPS data off of more personal pictures like pictures of my kids and/or around the house.
Indeed all the info to track someone down is available online for someone willing to search it out, but there is still a difference. An example would be if a pedophile happens to come across a pic of your child. If the GPS data is in the EXIF on that pic and that pedo knows how to view it, you’ve just given them a map right to where you kid’s bedroom is (or whatever, you get the idea). If the GPS data is not on the pic, then the pedo would have to work a lot harder to track down the info to stalk your kid…
I wouldn’t mind sharing GPS info on pics I took while on vacation or sight-seeing, but I don’t want any of that on pics of my family…
Good points, Alex. Since I don’t have children, I guess I don’t think quite as much about privacy concerns as you do. And since my cellphone sucks as a camera and my good camera doesn’t to GPS data, I don’t have to worry about location data on my photos unless I choose to.
Good counter-points Brian. I can’t argue with that.
Brian, you wrote:
>I can tell you that if you upload photos to Flickr, all the EXIF/Metadata stays intact.
That’s why I prefer to remove EXIF before uploading photos, with the help of EXIF Cleaner: http://www.superutils.com/products/exifcleaner/ And I don’t like console tools like jhead and ExifTool, because console scripting is so time consuming. Just my 5 cents guys.
Awww Shadow Annabelle!!!
lol
lol yeah isn’t she sweet?
Alex,
If you work on a PC, you can use our free software called FileMind QuickFix. It removes GPS location data as well as any other personal information (Iptc, XMP, Exif) from photos (JPG), with a single mouse click. A detailed description, youtube video and download link can be found here: http://www.metabilitysoftware.com/products/filemind-quickfix.html
[...] the exif data that involve downloading another piece of software. You can learn one way to do it here. But the PowerPoint method is far simpler for most end users. A final word to the wise – [...]
there’s a really easy non-command line option for removing getoags and other data from photos. It also works on a smartphone too, which is how most people share photos online. Try using Pixelgarde Photo Privacy Editor if you’re not familiar with command line, or just want a more convenience alternative for removing EXIF data when you share photos. It’s free too.
If you’re not familiar with command line, or just prefer an user interface for your free software, try an app for PC, iPhone or Android called Pixelgarde Photo Privacy Editor. http://www.pixelgarde.com/ They support these applications with Ads, but it’s the easiest free alternative i’ve found. hope other find this useful.
[...] Yet another reason to strip exif data from your pics before you post them online. There's a load of info in them. How to Remove Location and Camera Data (EXIF) from your Photographs Why and How to Remove EXIF (Meta/GeoTag/GPS) Data From Pics | Alex’s Antidote [...]
Thank you for this! So very much!
You are most welcome!
Hi,
Thanks, I didn’t know Jhead; looks nice.
Regarding the use on Mac OS X, instead of defining an alias for this particular program, I would recommend adding your ‘directory of choice’ to the $PATH variable, so that you can directly access any program there by just typing its name, instead of having to do an alias for each program you add.
To do this, just add the line:
export PATH=/Applications/Utilities/NoGUI:$PATH
to your .profile file (of course, the ‘/Applications/Utilities/NoGUI’ part can be replaced by whatever directory one chooses to use).
Cheers!
GalTrack
Thank you for the feedback GalTrack. I didn’t think to add it to PATH, but that makes sense to me. I appreciate the tip.
jhead -mkexif *.jpgdoes remove neither XMP data nor IPTC data. At least XMP data may contain GPS information, so it is better to usejhead -mkexif -di -dx *.jpg. I have not found an easy way to remove only GPS information (and possibly other information concerning location) in linux.Thanks for the info Jarno, I appreciate it.