MODULE_DEPLOYED // EXIFTOOL-FILE-METADATA

EXIFTOOL: READ THE TAGS ON A FILE YOU ALREADY HAVE, THEN DECIDE WHAT TO STRIP

A read of the tags in a file you already hold: which ones are stored, which ExifTool calculated, and what a GPS strip leaves behind.

BEGINNER

TIME: 34 MIN READ · 40 MIN HANDS-ON

PHASES: 5

THIS_VISIT0 / 5 MARKED (0%)

Ticks last until you refresh. This page does not keep a score.

MISSION_PHASES
1
WHAT EXIFTOOL DOESDURATION: 10 min
2
WALKTHROUGHDURATION: 12 min
3
LIMITS AND FALSE POSITIVESDURATION: 8 min
4
ETHICS AND LEGAL LIMITSDURATION: 6 min
5
QUIZDURATION: 4 min
PHASE_001 // CURRENT_OBJECTIVE
WHAT EXIFTOOL DOES
NODE: 1 / 5

The job is a tag list for a file you already hold

Someone drops a photo in the work chat and writes "the EXIF says they were there." The useful reply is smaller than the pin. You take a file you already have, you ask which tags are actually in it and which group each one sits in, and you write down the sentence you are willing to repeat. A coordinate is a tag. It is not a whereabouts until something else, something you can name, says so.

ExifTool is Phil Harvey's program. The homepage at https://exiftool.org/, read for this lesson on 22 November 2026, calls it a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. The download line on that page was Version 13.64, dated Nov. 16, 2026. The README in the source tree, checked the same day, carries Copyright 2003-2026, Phil Harvey, and says you may redistribute it under the same terms as Perl itself: the Perl Artistic License, or the GPL. Running the binary for this exercise is ordinary use of that licence. A modified copy you ship later is the README's obligation, not a mood about open source.

The format list is why "no EXIF" is a sloppy sentence. That homepage names EXIF, GPS, IPTC, XMP, JFIF, maker notes, and C2PA JUMBF among what the tool reads. The application documentation, https://exiftool.org/exiftool_pod.html, prints a table of file types marked read, write, or create, and a second table of metadata formats. GPS has its own row, and it also hides inside other formats. A JPEG can carry a GPS group and an XMP copy. A QuickTime file can carry GPSCoordinates. A PDF can carry an Author. The tables move. exiftool -ver, and the page open in front of you, are the list that counts.

Two builds will not greet you the same way, which is why a cheatsheet that cannot name its version is a souvenir. The pod says the documentation is displayed if exiftool is run without an input FILE when one is expected. The binary this lesson actually ran was 12.76, from a Debian-family package, against a website that was offering 13.64. On 12.76, exiftool with no file printed two lines, Syntax: exiftool [OPTIONS] FILE and a pointer at the documentation. It did not print the manual. -h is not how you ask for the manual either. In the option overview, -h is -htmlFormat, "Use HTML formatting for output." -H is -hex, "Show tag ID numbers in hexadecimal." Case is significant for that pair because the upper-case option exists. The same overview says multiple single-character options may not be combined into one argument. On 12.76, exiftool -h with no file printed the same two-line syntax, and exiftool -h -Artist against a JPEG printed an HTML table. If your -ver and this paragraph disagree, -ver wins, and so does the pod.

A default read is not everything. FAQ 3, on https://exiftool.org/faq.html, gives the command this lesson uses and explains the three flags.

exiftool -a -G1 -s FILE

-a allows duplicate tags to be extracted. Without it, one of two tags that share a name is suppressed. -G1 prints the family 1 group, which is the location: GPS, ExifIFD, IFD0, a particular XMP namespace, System, Composite. -s prints tag names instead of descriptions. FAQ 2 is blunt about that difference. Descriptions often contain spaces. Tag names never do. Tag names stay English even when -lang changes the description. You file the tag name. "GPS Latitude" and GPSLatitude are not the same string, and only one of them is what you will type back.

Composite tags are generated. They are not stored in the file. -e is --composite: extract existing tags only, and do not generate composite tags. GPSPosition is one of these. FAQ 14 says version 12.36 and later make Composite:GPSPosition writable, so one assignment can create the stored latitude, longitude, and the two reference tags. On a read, a line in the Composite group is ExifTool doing arithmetic. It is not a second device that agreed with the first.

The GPS trap is the one FAQ 3 bothers to spell out. exiftool -gps:all image.jpg does not necessarily extract the EXIF GPS tags, because a same-named tag in another group can suppress them before the group filter runs. The FAQ's wider command, for a video as much as for a JPEG, is:

exiftool -a "-gps*" -ee FILE

The quotes stop the shell treating * as a glob. -ee extracts embedded documents. GPS that lives somewhere other than the EXIF GPS group is why the wildcard is there, not a decoration.

Dates have the same shape of mistake. FAQ 5 says the standard ExifTool prints and expects is YYYY:mm:dd HH:MM:SS. XMP can carry fractions of a second and a zone, written +HH:MM, -HH:MM, or Z. The EXIF tag DateTimeOriginal is that string. A zone, when the file has one, is a different tag. The EXIF tag table on https://exiftool.org/TagNames/EXIF.html lists OffsetTime (0x9010) as the zone for ModifyDate, OffsetTimeOriginal (0x9011) as the zone for DateTimeOriginal, and OffsetTimeDigitized (0x9012) as the zone for CreateDate. An older TimeZoneOffset (0x882a) is documented there as one or two hour-offsets from GMT. None of those tags have to exist. FAQ 16's command for "which clocks are in this file" is:

exiftool -time:all -a -G1 -s FILE

AllDates is a shortcut for three names: DateTimeOriginal, CreateDate, and ModifyDate. It is not every time tag. FileModifyDate is a filesystem pseudo-tag. Copying the file, or rewriting it, moves that clock. The camera did not.

QuickTime keeps yet another clock. The QuickTime tag page says integer dates should be stored as UTC, and that cameras often store local time anyway. The API option QuickTimeUTC, in the Image::ExifTool documentation, tells ExifTool to assume those integer values are UTC and to convert them to local time on the way out. The same paragraph says the default is not to convert, because of those cameras, with Canon CR3 named as the exception that does always use UTC. FAQ 16 adds the practical half: MOV and MP4 files typically have no DateTimeOriginal, so you look at CreateDate, and you add -api QuickTimeUTC only when you have a reason to believe the stored value is UTC. Adding it because a blog did is how a local clock becomes a confident error of several hours.

Writing is a different mode. The pod is plain about the backup. Assigning -TAG=VALUE, or -TAG= with nothing after the equals to delete, rewrites the file. By default the previous bytes are kept under the same name with _original appended. You compare before you delete that file. -overwrite_original replaces the original by renaming a temporary file, and the pod says to use it only when you already have a separate backup. -overwrite_original_in_place is the slower variant that tries to keep some filesystem attributes. -P preserves FileModifyDate. This lesson leaves all three off, so the _original file is the before picture you can still open.

Deleting is not one switch. The geotag examples in the pod say -geotag= removes GPS tags that the geotag feature added, and that it does not remove all GPS tags. The command they give for all of them is -gps:all=. -all= deletes metadata, with the exceptions written next to it. Not every group is deletable. On a JPEG, the APP14 Adobe group is not removed by a default -all=, because it can change how the picture looks, while colour-space information is removed and the colours can shift unless you copy the ColorSpaceTags shortcut back. Deleting EXIF or IFD0 on a JPEG also deletes the groups the pod lists as living inside them: ExifIFD, GlobParamIFD, GPS, IFD1, InteropIFD, MakerNotes, PrintIM, and SubIFD. The pod's own piping examples call IFD1 the thumbnail image IFD. On a TIFF, deleting EXIF does not delete IFD0, because IFD0 is the image. FAQ 7 is that limitation in one paragraph. FAQ 32 is the one that says not to strip a RAW on the theory that the metadata and the pixels come apart cleanly. They do not. FAQ 32's JPEG command, which keeps an ICC profile and writes the colour-space tags back, is:

exiftool -all= --icc_profile:all -tagsfromfile @ -colorspacetags FILE

The FAQ shows it with -ext jpg and a directory. The assignments are the same against one JPEG you name. PDF is a third object. Note 3 in the writing section says changes to a PDF are reversible, because the original information is never actually deleted from the file, and that ExifTool alone may not be used to securely edit PDF metadata. You can remove an update later with -PDF-update:all=. This exercise does not open a PDF.

Maker notes are the camera's own block. The pod says that, in general, they are Permanent: they may be edited, and they are not created or deleted as individual tags. Deleting the EXIF group that contains them is a different act from deleting one maker-note field. FAQ 15 is the page for the warning about bad offsets. Some other program rewrote the file and left the pointers wrong. -F asks ExifTool to try a correction. -m ignores minor errors, and the FAQ says maker-note information can be lost when you do that. This lesson passes neither flag. A warning is a line you keep. It is not a location.

Two further switches are why "I ran ExifTool" is not "I saw every tag." -fast2, in the pod, skips EXIF maker notes and stops early in some formats, including at the IDAT chunk of a PNG and the mdat atom of a QuickTime file. FAQ 30's command for absolutely all metadata is longer on purpose, because duplicates, unknown tags, embedded tags, and some system tags are off by default:

exiftool -ee3 -U -G3:1 -api requestall=3 -api largefilesupport FILE

You do not need that command to finish. You need to know the ordinary read left those out. -u and -U are the unknown-tag switches if a later question actually wants them. The homepage also lists a geolocation feature that names the nearest city from a GPS position, and the reverse. The pod's write-up example is -geolocate=geotag while geotagging from a track, and it sends you to https://exiftool.org/geolocation.html. A city that feature adds was not in the camera. This lesson does not run it. -password is documented for a protected file you are allowed to open, using a password you already have. This lesson does not run that either. There is no password to guess, and guessing is not the exercise.

The Windows zip, on the homepage, includes Perl. exiftool(-k).exe pauses so a double-click can show the documentation. Renaming it to exiftool.exe is the command-line form, and the exiftool_files folder has to move with the exe. The Mac package on that page installs the command under /usr/local/bin. A distro package can lag the homepage, which is what 12.76 next to 13.64 was. Whatever you installed, -ver is the number in the note.

The useful line is a tag name, the group, and whether the file stored it or ExifTool calculated it. A pin is how a tag list starts pretending to be a whereabouts.
ASK_A_QUESTION