.DS_Store

What is a .dsstore file?

macOS Finder folder metadata — icon positions, view modes, custom backgrounds. Created automatically by Finder, often accidentally committed to repos.

Safe format
Type Misc
By Apple Inc.
MIME application/octet-stream

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

Every folder you open in macOS Finder gets a `.DS_Store` (Desktop Services Store) file written into it — a small binary file that remembers icon positions, view modes (icon vs list vs column), background images, and other Finder-specific preferences for that folder. The file is invisible by default (leading dot plus macOS hiding rules), so most Mac users never notice it exists until it shows up somewhere unexpected.

The format is a proprietary binary structure derived from Apple's BUD1 schema (the magic bytes literally spell "Bud1" after a 4-byte length prefix). It's not officially documented, but third-party libraries can parse it — useful for forensics or for cleaning up after macOS users in shared environments. Tools like `dsstore` (Python library) and `dsstoreedit` decode the structure. The contents are often more revealing than they look: leaked .DS_Store files can disclose folder contents and naming patterns.

The chronic problem is that .DS_Store files leak into version control, ZIPs, and shared network folders. Every macOS user has at some point committed a .DS_Store accidentally. Standard fix: add `.DS_Store` to your global gitignore via `git config --global core.excludesfile ~/.gitignore_global` then add the pattern to that file. To remove already-committed ones: `find . -name .DS_Store -print -delete && git add -A && git commit -m "remove .DS_Store"`. To stop Finder writing .DS_Store to network shares: `defaults write com.apple.desktopservices DSDontWriteNetworkStores true`.

Technical details
Full Name
.DS_Store
MIME Type
application/octet-stream
Developer
Apple Inc.
Magic Bytes
00 00 00 01 42 75 64 31
Safety
.dsstore is a known, safe format. Generally harmless, but .DS_Store files can leak folder contents and naming patterns when accidentally published — a security concern for sensitive deployments.
What opens it
Finder
FREE macOS
dsstoreedit
FREE macOS

* Reads .DS_Store automatically (file is hidden by default) * Inspect / edit DS_Store contents

FAQ
How do I stop Finder from creating .DS_Store files on network shares?
Run this in Terminal: `defaults write com.apple.desktopservices DSDontWriteNetworkStores true` then log out and back in. Finder will stop writing .DS_Store to SMB/AFP/NFS shares. There's no equivalent setting for local folders — Finder always writes them locally.
Why is my repo full of .DS_Store files I keep deleting?
Because they get re-created the moment a Mac user opens any folder in Finder. The fix is to add `.DS_Store` to your global gitignore (`~/.gitignore_global`) so git ignores them in every repo on that machine, not just the current one. Run `git config --global core.excludesfile ~/.gitignore_global` if you haven't set the global gitignore path already.
Is it safe to publish a .DS_Store file?
Usually yes — but they can disclose folder contents (filenames of files Finder has seen). Web servers occasionally serve .DS_Store files accidentally and security scanners flag this as info disclosure. If you're publishing a directory listing, deleting .DS_Store first removes one tiny attack surface.
Related formats