What Is the __MACOSX Folder in a ZIP, and Can You Delete It?
Someone sends you a ZIP. You open it on Windows and next to the files you expected sits a folder called __MACOSX, full of files that start with ._ and open as nonsense. Nothing is broken. The ZIP was made on a Mac.
On this page
The Short Answer
__MACOSX is where the Mac keeps the extra data of your files when the Finder compresses a folder. A Mac reads it back and hides it when it unzips. Every other system shows it as a plain folder. You can delete it from a ZIP you share, and in most cases you should.
Try it free: Remove __MACOSX from ZIP – drop a ZIP, get a clean copy without __MACOSX, .DS_Store and ._ files. Works in your browser, nothing is uploaded.
Where the Folder Comes From
A file on a Mac can carry more than its content. Finder tags, the colour label, the "downloaded from the internet" flag and old-style resource forks live next to the file, not inside it. A ZIP has no place for them.
So when you choose Compress in the Finder, the Mac writes that extra data into separate files and puts them in a folder named __MACOSX. Apple's own manual for the ditto command describes it this way: Finder's Compress is ditto -c -k --sequesterRsrc --keepParent, and the sequester option is the one that moves resource forks and file metadata into __MACOSX.
When a Mac unzips the file, it folds the data back onto the right files and you never see the folder. Windows, Linux, Android and most online viewers don't know the trick and show it as it is.
The Three Kinds of Mac Files You Will Meet
The __MACOSX folder. It mirrors your folders, with one ._ file for each original that had extra data. Delete it and the files themselves are untouched.
._ files. These are AppleDouble files: the extra data of one file, stored next to it under the same name with ._ in front. Inside __MACOSX they are always Mac data. They also turn up outside it, because the Mac writes them on USB sticks, SD cards and network drives that cannot hold the extra data themselves. Zip such a folder on any system and the ._ files go along.
.DS_Store. The Finder drops one into every folder you open, to remember how the window looked: icon positions, sort order, view mode. It sits among your files, not in __MACOSX, so it ends up in ZIPs made with any tool unless you leave it out.
What These Files Can Say About You
Most of the time they are just clutter. Sometimes they say more than you meant to send.
The ._ files keep a file's extended attributes. One of them, kMDItemWhereFroms, is the web address the file was downloaded from. Forensic tools look for exactly this in __MACOSX folders, because people zip a downloaded file and send along the link it came from without knowing it. Another holds your Finder tags, and a tag named after a client or a project travels too.
A .DS_Store file can hold the names of the files in its folder. Security researchers have used .DS_Store files left on web servers to list folders that were meant to stay private, and a .DS_Store can still name files that were deleted from the folder. Zip a folder with it inside and the recipient gets a list of what else was there.
None of this is your documents. It is the paperwork around them, and you can leave it out.
Is It Safe to Delete?
For a ZIP you send to someone, yes. Documents, photos, code and spreadsheets are complete without these files on every system.
What you give up is the Mac extras: tags, colour labels, the download record and the quarantine flag that makes a Mac warn before opening a downloaded app. If you are backing up your own Mac and want everything back exactly as it was, keep them. For sharing, nobody will miss them.
How to Zip on a Mac Without Them
The Terminal's zip command adds no __MACOSX folder. To leave out .DS_Store too, add an exclusion:
zip -r archive.zip folder -x "*.DS_Store"
If you prefer ditto, Apple's manual says --norsrc skips resource forks and file metadata, so ditto -c -k --norsrc --keepParent folder archive.zip leaves out __MACOSX. It still packs .DS_Store, because to ditto that is an ordinary file.
Both are easy to forget the next time you right-click Compress. That is why cleaning the finished ZIP is often simpler.
How to Clean a ZIP You Already Have
On a Mac or Linux, one Terminal line removes the folder and every .DS_Store. It changes the file in place, so run it on a copy:
zip -d archive.zip "__MACOSX/*" "*.DS_Store"
That line does not touch ._ files outside __MACOSX, the ones that came from a USB stick or a network drive. A pattern like "*/._*" would catch them, and it would also delete a file you named ._config on purpose.
No Terminal, or on Windows, a Chromebook or a phone? Drop the ZIP into our Remove __MACOSX from ZIP tool. It removes __MACOSX, .DS_Store and the folders a Mac adds to whole drives. A ._ file goes only when its content starts the way Mac AppleDouble data does, so your own ._config stays. Thumbs.db and desktop.ini, the Windows equivalents, go too while their box is ticked.
Every other file is copied into the new ZIP without being compressed again, with its name, date and permissions. Before the download appears, the new ZIP is opened again and each file is checked against the original. A password-protected ZIP is refused, because its files cannot be copied without the password.
A Note on Privacy
The cleaning runs in your browser. The ZIP is read and rebuilt on your device, nothing is sent to a server, and closing the tab discards it. That matters here, since the point is to keep the hidden parts of your files to yourself.
A clean ZIP still carries what is inside the files. Photos keep their own metadata, such as location and camera. For that, use the EXIF Remover on the photos, and the PDF Metadata Remover or Word Metadata Remover on documents, before you zip them.
Common Questions
What is the __MACOSX folder?
It is where the Mac Finder puts the extra data of your files when it compresses a folder: tags, extended attributes and old-style resource forks, one ._ file per original. A Mac folds it back in when it unzips. Windows and Linux show it as an ordinary folder.
Is it safe to delete __MACOSX?
For sharing, yes. Your documents, photos and code are complete without it. What you lose are Mac extras such as Finder tags and the record of where a file was downloaded from, which the person you send it to rarely needs.
Can a ZIP leak private information?
It can. A ._ file may carry the web address a file was downloaded from, and a .DS_Store file may list the names of files in its folder, including some you did not put in the ZIP.
How do I remove __MACOSX without a Mac?
Drop the ZIP into our free Remove __MACOSX from ZIP tool. It removes the folder, .DS_Store and Mac ._ files in your browser and gives you a clean copy. Nothing is uploaded.
Send the Files, Not the Paperwork
The person you send a ZIP to wants your files. Give them just that. Clean your next one with Remove __MACOSX from ZIP.
Tools used in this guide