How to Hide Files on Mac (and Why Hiding Is Not Encryption)
How to hide files Mac users won't see in Finder with Command-Shift-Period, dot names and chflags, and why hidden files still need encryption to stay private.
To hide files on a Mac, rename the file with a leading dot or run chflags hidden on it in Terminal. Finder stops showing it, and Command-Shift-Period brings it back. That is the catch: hiding only removes an item from view. Anyone who sits down at your logged-in Mac can reveal it in a second and read it. If the contents matter, you need encryption, not hiding.
How to show or hide hidden files in Finder
The quickest way to see what is hidden on your Mac is a keyboard shortcut.
- Open a Finder window.
- Press Command-Shift-Period.
- Hidden items appear, slightly faded.
- Press the same shortcut again to hide them.
The shortcut works in Finder windows and in most Open and Save dialogs. It is a toggle for the whole view, so it reveals every hidden item in that folder: dotfiles, items with the hidden flag, and system folders like ~/Library.
This is the first reason hiding is weak. You do not need any skill or tool to undo it. The shortcut is documented widely, and anyone who has used a Mac for a while knows it. You can also open a hidden path directly with Go > Go to Folder (Command-Shift-G) if you know where it is.
Method 1: Hide a file with a leading dot
On macOS, files and folders whose names begin with a period are treated as hidden by Finder. This is the same convention Unix systems use for configuration files such as .zshrc.
In Terminal (the most reliable way):
mv -n "$HOME/Documents/Tax Records" "$HOME/Documents/.Tax Records"
The -n flag stops mv from overwriting anything if a file with the new name already exists. To undo it:
mv -n "$HOME/Documents/.Tax Records" "$HOME/Documents/Tax Records"
In Finder: you can rename an item and start the name with a dot. Finder shows a warning that names beginning with a dot are reserved for the system and that the item will be hidden. If you confirm, it disappears from view. To get it back, press Command-Shift-Period, select it, and rename it without the dot.
The dot method is simple, but the name change can break things. Apps that remember the old path will not find the file, and aliases may stop resolving. Use it for things you do not open often.
Method 2: Hide with chflags hidden
macOS also has a file flag called hidden. It keeps the real name intact, which makes it tidier than the dot method. You set it with chflags:
chflags hidden "$HOME/Documents/Tax Records"
To make the item visible again:
chflags nohidden "$HOME/Documents/Tax Records"
A few practical notes:
- Put the path in quotes if it contains spaces.
- You can type
chflags hidden(with a trailing space) and then drag the item from Finder into the Terminal window to fill in its path. - If you hide a folder, the flag is set on the folder itself. Its contents are untouched.
- To check whether an item has the flag, run
ls -lOon the parent folder. The flags column will showhidden.
Warning: Only run
chflagson your own files. Do not usesudowith it on system folders, and do not hide things you may need later unless you remember the path. If you forget where something is, Command-Shift-Period in Finder is the way back.
What hiding does well, and where it fails
Hiding is not useless. It declutters Finder, keeps casual eyes off a folder, and stops you from accidentally moving or deleting configuration files. For a surprise-gift folder or a messy project directory, it is enough.
It fails as a privacy measure for several reasons:
- Reveal is one shortcut away. Command-Shift-Period works for any user.
- The data is not changed. The file is stored exactly as before. Any app, script or person who opens the path gets the full contents.
- Terminal ignores it.
ls -alists dotfiles, and the hidden flag does not stop you from reading a file by its path. - There is no password. Nothing asks the person to prove who they are.
- A copy is a copy. If the item is copied, shared or synced, the contents travel in plain form. Whether the hidden state survives depends on the method and the tool, so do not rely on it.
In short, hidden files stay readable by anyone with access to the Mac. Encryption is different: it scrambles the contents so they cannot be read without the key, even if someone finds the file.
Hiding vs encryption at a glance
| Leading dot | chflags hidden |
Encrypted container | |
|---|---|---|---|
| Removes item from normal Finder view | Yes | Yes | No, unless you also hide it |
| Revealed by Command-Shift-Period | Yes | Yes | Not needed; the item is visible |
| Contents readable by someone with access | Yes | Yes | No, without the password or key |
| Needs a password to open | No | No | Yes |
| Changes the file name | Yes | No | Depends on the tool |
| Good for | Decluttering | Decluttering | Private or sensitive data |
When to use each
Use hiding when the goal is tidiness or avoiding accidents: project folders, config files, or items you want out of the way. Assume anyone can find them.
Use encryption when the contents would cause harm if someone read them: tax records, ID scans, client files, medical documents, recovery keys, or anything you share a Mac with other people for.
Use both if you want the item out of sight and unreadable. Hiding then adds a small layer of obscurity on top of real protection, but it should never be the only layer.
What macOS offers for real protection
macOS has solid built-in tools. They just solve different problems.
- FileVault encrypts the whole startup disk. It protects your data if the Mac is lost or stolen while powered off or logged out. Once you are logged in, your files are readable by anyone using your session, so it does not protect individual folders from someone at your unlocked Mac.
- Encrypted disk images in Disk Utility let you create a disk image from a folder with 256-bit AES encryption. This is a real option and it is free. The trade-off is manual work: you create the image, move your data in, mount it with a password, eject it, and remember to delete the original.
- Password-protected zip files are possible but awkward, and the strength depends on how they are made. We cover that in how to password protect a zip file on Mac.
For a side-by-side look at the options, see how to password protect a folder on Mac: 4 encryption options compared.
How Finderlock protects a folder
Finderlock is a macOS app (macOS 13.5 or later; the Finder right-click menu and badges need macOS 14) that does the encryption for you. When you protect a file or folder, it encrypts the item into its own .secured container with AES-256-GCM (Apple CryptoKit), with a key derived from your password using PBKDF2-HMAC-SHA256 (150,000 iterations, random 32-byte salt).
One point to be clear about: Finderlock does not make items invisible. A locked item leaves a placeholder file at its original location, so you can still see that something is there. What you cannot see, without unlocking, is the content.
Here is the basic flow:
- Install Finderlock from finderlock.com.
- In Finder, right-click the file or folder and choose Protect.
- Set a per-item password (stored in the macOS Keychain), or use Touch ID on plans that include it.
- The item is encrypted into its own container, and a placeholder takes its place.
- To open it later, double-click the placeholder. It unlocks without opening the main app window.
- To secure it again, right-click and choose Lock.
The right-click menu also has Unlock and Shred. Shredding is a Lifetime-plan feature that uses a DoD 5220.22-M style multi-pass overwrite. Do not count on any overwrite method to work reliably on an SSD.
Locking without remembering to
The weak point of manual encrypted images is forgetting to eject them. Finderlock can auto-lock on inactivity and on sleep. It also has lock-on-close, which notices when the app that opened a file quits. The Pro plan adds smart rules for logout, user switch, screen saver, system lock and process exceptions.
Other details worth knowing:
- A menu bar app and a dashboard give you search and drag-and-drop. Bulk operations come with Pro and above.
- An optional app-wide master password uses a 5-minute session.
- You can back up encrypted containers to iCloud or Google Drive. A recovery tool uses the master password.
- Everything runs locally. The only network use is the license check, optional opt-in analytics, updates and any backup you choose.
The free plan covers 3 protected items, without Touch ID. Personal adds unlimited items, Touch ID and 2 devices. Pro adds bulk operations and smart auto-lock on 5 devices. Lifetime adds shredding and unlimited devices. Pricing is one-time: Personal $49, Pro $99, Lifetime $149. For more detail, see the security page and the docs.
If you want to compare tools first, see best Mac encryption apps.
FAQ
How do I show hidden files on Mac?
Open Finder and press Command-Shift-Period. Hidden items appear faded. Press it again to hide them.
How do I hide a folder on Mac using Terminal?
Run chflags hidden "/path/to/folder". To reverse it, run chflags nohidden "/path/to/folder". You can also rename the folder with a leading dot using mv.
Are hidden files on Mac secure?
No. Hidden files are only out of sight. Anyone with access to your Mac can reveal them with Command-Shift-Period or read them via Terminal. Only encryption makes the contents unreadable without a password or key.
Does FileVault protect individual folders?
Not from someone using your logged-in Mac. FileVault encrypts the disk at rest, which helps if the Mac is lost or stolen. For per-folder protection while you are logged in, use an encrypted container or an app built on one.
Does Finderlock hide my files?
No. A locked item stays visible as a placeholder file at its original location. The contents are in an AES-256-GCM encrypted container and cannot be read until you unlock them.
Next step
Use Command-Shift-Period to see what is hidden on your Mac today, and decide which items are only clutter and which are sensitive. For the sensitive ones, hiding is not enough. You can encrypt them by hand with a Disk Utility image, or try Finderlock, which has a free plan covering 3 protected items.