ExifTool is an open source and cross-platform metadata editor
Metadata is useful in many ways, for instance when it comes to search or the representation of data. AÂ popular type is exif data that's associated with photos.
These are used for all kinds of purposes. Photographers use them to check various characteristics of a photo, e.g. the camera make and model, aperture or ISO.
But it's not the only kind of metadata. You may use ID3 tags for your music files for example. Similarly, documents, videos or images that you create contain other forms of metadata. Right-click on a file and select Properties > Details in Windows. The data that you may see will differ, but you should know that metadata can contain personally identifiable data such as the latitude and longitude (GPS location), date created/modified,Â or the author name.
You can edit or delete metadata with the help of programs like ExifTool by Phil Harvey. It is a command-line application (technically a script). Download the archive; it contains an executable. Don't run it though. Instead, drag and drop files or folders on it using Explorer. This will open a command window that displays the metadata of the file.
An alternative way to use it is to rename it from exiftool(-k).exe to exiftool.exe. Place it inside a folder that is a system path so that you may run it easier from the command prompt; this mode allows you to use all features in the application, so this is what we will be using here. When you want to use it, open a command window, drag and drop the exiftool.exe to the window to run it from its location. This method can also be used for adding an image's path quickly. Repeat the steps, add a space after "exiftool", and then drop the image onto the window before hitting Enter.
Look at these two screenshots. They contain a ton of metadata from just one photo I took on vacation last year.
The GPS data isn't shown because I chose not to include it, but you can tell from the image that it was taken on an ASUS device with the model number X00TD, which is the Zenfone Max Pro M1. The profile creator ID is Google, because I used the Google Camera app to take the image. There are a lot of other information (Megapixels, aperture, ISO, shutter speed, resolution time of the photo capture) embedded in the picture.
Why is this important? Say for example, you took a picture at your home and uploaded it on the internet. If you have not removed metadata before uploading to a service, or if the service does not scrub metadata automatically, others may look at the metadata which may reveal information that you don't want to become available.
How to remove, edit or extract exif data using Exiftool?
You have two options to delete exif data from files.
exiftool -exif:all= image.jpg
This tells ExifTool to delete all exif (personally identifiable) tags from the image's metadata. The program does not modify the original file. Instead, it creates a copy of it with the modified metadata, which can be useful for sharing online. The original file is renamed as image.jpg_original.
Alternatively, use the following command.
exiftool -all= image.jpg
This will delete even more tags (XMP). The resulting file will still have the regular properties of a file (size, name, date created, etc).
Editing exif data is pretty easy. Type exiftool followed by the attribute that you wish to change using the following syntax.
exiftool -attribute=edit image.jpg
Let's say we want to add something to an image, exiftool -Comment="This is gHacks" image.jpg. This will add an attribute called "Comment" and the value for it will be This is gHacks.
How do we remove exifdata? Let's use the comment tag as an example again. If you want to delete it,Â leave the comment's value blank. The command will be,
exiftool -Comment= image.jpg
ExifTool supports batch exif deletion and editing too, all you have to is add several images after the command. For e.g. if we want to remove tags from 3 images.
exiftool -all= image.jpg image2.jpg image3.jpg
Editing images works in the same manner.
exiftool -Copyright=gHacks image.jpg image2.jpg image3.jpg
Ignore the maker notes error in the screenshot. This happens when Exiftool may not recognize the maker notes which could result in original data lost. But it wasn't in my case.
Batch editing also works with entire folders.
exiftool -all= H:\Photos
You can use wildcards like *.jpg, -GROUP:TAG=, etc to only edit specific files and tags.
To extract information from a picture just drag and drop an image as described earlier. You can save the content to a text document or CSV using a command like.
exiftool -T -common H:\Photos > H:\Photos\ghacks.txt
This saves common metadata from the files in the specified folder to the text file named ghacks.txt; it will be saved to the defined folder (in this case, the same directory). You can use -r for Recursive mode (creates one text document for each file), instead of a single tab delimited file.
There is a page on the official website that has more examples.
ExifTool is an open source application, written in Perl. I have just mentioned the basics of the program here, refer to the official documentation for more commands, tags, etc.
If you're looking for a way to view or edit EXIF, GPS, ID3, IPTC, XMP, MakerNotes, and other metadata, ExifTool is an excellent choice. It is used in third-party programs like Advanced Renamer, Batch Image Cropper.