How to check a file's metadata on a Mac
Select the file in Finder and press Command-I for the basics: size, dates, and a “More Info” block that often includes camera model, dimensions, and the URL a download came from. For photos and PDFs, open the file in Preview and press Command-I to see the full EXIF and GPS record. For everything Spotlight knows, run mdls on the file in Terminal.
Each of those views shows a different slice, so this post walks through all four and what each one misses.
What “metadata” means for a file
Metadata is information stored with a file that is not the content itself. Some of it lives inside the file (a photo’s GPS coordinates, a Word document’s author and revision count, a PDF’s producer application). Some of it lives beside the file, in the filesystem (creation date, Finder tags, the download URL macOS records as an extended attribute). The distinction matters because the two travel differently: the inside kind goes wherever the file goes, while the beside kind is usually lost when you email a file and usually kept when you AirDrop or zip it.
No single built-in Mac tool shows both kinds together, which is why checking properly takes more than one step.
Finder: Get Info
This is the quickest look and the one most people already know.
- Select the file in Finder.
- Press Command-I (or File > Get Info).
- Read the General section for kind, size, location, and created and modified dates.
- Expand More Info. For an image you will typically see dimensions, color space, and sometimes camera make, model, and exposure. For a video you will see duration, dimensions, and codecs. For a download you may see a “Where from” line with the full URL.
What Get Info does not show: GPS coordinates in most cases, Word tracked changes or comments, PDF author and producer fields, and any of the hundreds of EXIF tags a camera writes beyond the handful Spotlight surfaces. Treat it as a summary, not an audit. There is a longer post on this at what-finder-s-get-info-shows-and-what-it-hides.html.
Preview: the Inspector for photos and PDFs
Preview reads the metadata inside image and PDF files, which is the kind that follows a file everywhere.
- Open the photo or PDF in Preview.
- Press Command-I, or choose Tools > Show Inspector.
- Click through the tabs. For a photo you will usually see General, EXIF, and, if the image has coordinates, a GPS tab with a map. Some photos also show TIFF, JFIF, or IPTC tabs depending on what the camera or editing app wrote.
- For a PDF, the General tab lists Title, Author, Subject, Keywords, Creator (the app that made the document), Producer (the PDF library that wrote it), and the creation and modification dates.
The GPS tab is the one worth checking before you share anything. If it is there, the photo can be placed on a map by anyone who opens it. The Inspector has a “Remove Location Info” button on that tab, which is the fastest built-in fix for a single photo.
Terminal: mdls shows what Spotlight indexed
The mdls command prints every metadata attribute Spotlight has extracted from a file. It is the most complete single view on a Mac that does not require installing anything.
- Open Terminal (Applications > Utilities).
- Type
mdlswith a trailing space, then drag the file from Finder into the Terminal window. The path fills in. - Press Return.
You will get a long list of attributes prefixed with kMDItem. The ones worth scanning for:
kMDItemWhereFroms: the URL the file was downloaded from, and sometimes the email or Messages sender it arrived from.kMDItemLatitudeandkMDItemLongitude: GPS, if present and indexed.kMDItemAuthors,kMDItemCreator,kMDItemLastUsedDate: for documents.kMDItemAcquisitionMakeandkMDItemAcquisitionModel: the camera.kMDItemEncodingApplications: the app that wrote the file.
Two caveats. First, mdls only shows what Spotlight’s importers chose to extract, so it can miss fields that a dedicated metadata tool would show. Second, the WhereFroms and similar values are extended attributes on your disk, not inside the file, so they will not be seen by someone you email the file to (they may be seen by someone you AirDrop it to).
Office documents, video and audio
Office documents carry their own metadata in a separate part of the file, and Spotlight only surfaces some of it.
- Open the document in Word (the same applies in Excel and PowerPoint).
- Choose File > Properties.
- The Summary tab shows Title, Author, Company, and Comments. The Statistics tab shows created, modified, and last printed dates, the name of the last person who saved it, the revision number, and total editing time.
That last set is the one people forget. A revision number of 47 and eleven hours of editing time tell a story about a document, and so does a “last saved by” name that is not the person who sent it.
If you want to see everything, a DOCX is a zip archive. Duplicate the file, change the extension to .zip, double-click it, and open docProps/core.xml and docProps/app.xml in TextEdit. The word/comments.xml file, if it exists, contains every comment. The post on track-changes-and-comments-can-leak-cleaning-a-docx-before-you-send-it.html goes deeper on that.
For video, QuickTime Player shows only the basics in Window > Show Movie Inspector: format, dimensions, frame rate, and data rate. It does not show the location or device fields an iPhone writes into a MOV.
For those, mdls is the better tool; look for kMDItemLatitude, kMDItemAcquisitionModel, and kMDItemContentCreationDate. If you have ffmpeg installed, ffprobe on the file prints the full metadata block, including com.apple.quicktime.location.ISO6709 when present.
Audio files keep their metadata in tags (ID3 for MP3, atoms for M4A). The Music app shows the editable ones through Get Info on a track. mdls will show title, artist, album, and the encoding application.
Stripping what you found
Checking is one job and removing is another. Preview handles GPS on a photo at a time. Word’s Preferences > Security has a “Remove personal information from this file on save” option. PDF metadata is awkward to edit with what ships on a Mac.
If you have a stack of files to clean rather than one, Manatee has a Clean mode that strips GPS, camera EXIF, and document author and revision metadata from photos, PDFs, and Word documents in one pass. It always writes a cleaned copy alongside the original rather than modifying it, and nothing leaves the Mac. It is worth being clear about scope: it removes metadata, it does not alter the picture or the text, and it is not an audio tag editor.
Questions
Does renaming a file or copying it remove metadata?
No. Renaming changes nothing inside the file, and copying carries the inside metadata with it. Copying to a different disk format or emailing the file can drop extended attributes like the download URL, but EXIF, document properties, and PDF fields all survive.
Why does Get Info show a camera model but no GPS?
Finder’s More Info block is assembled from a short list of Spotlight attributes. Camera make and model are on the list; coordinates usually are not shown there even when the file has them. Use Preview’s Inspector to be sure.
Can I see metadata for a file without opening it in an app?
Yes, mdls in Terminal reads the Spotlight index and never launches the file. Quick Look (press Space in Finder) shows a preview but hardly any metadata beyond what Get Info shows.
Is there a way to check a whole folder at once?
In Terminal, mdls accepts several paths, so you can drag a selection of files in at once. Finder’s Get Info on multiple selected files shows only combined size, not per-file detail.