How to Hide a Folder on Mac — All Methods Including Terminal
Whether you need to quickly clear desktop clutter or securely lock sensitive financial documents away from shared users, macOS offers several ways to make files invisible. Here is the complete breakdown.
The fastest built-in way to hide a folder on Mac is using the Terminal app. Open Terminal and type chflags hidden (leave a space at the end), drag your folder into the window, and press Enter. The folder will vanish.
To view it again, open Finder and press Cmd + Shift + . (period). If you need real password protection rather than just invisibility, you will need to use Disk Utility to create an encrypted disk image, or a dedicated security app like Folder Lock.
What People Search For
We analyzed the most common questions Mac users have about folder privacy. This guide covers:
Before You Begin
- macOS Compatibility: The built-in methods below work identically across macOS Ventura, Sonoma, and Sequoia.
- OS Requirements: If you opt for third-party folder lock software rather than native terminal commands, verify your system version. Advanced encryption tools generally require macOS 13 or newer.
- Hiding vs. Locking: Hiding a folder stops it from being seen visually. It does not encrypt the data or require a password to search via Spotlight if the user knows what to look for.
- Backups: Always ensure your Time Machine backup is current before altering directory flags via Terminal.
How to Hide a Folder on Mac — All Methods
There are three primary ways to handle hidden folder mac requests. The right choice depends entirely on who you are hiding the files from. Are you hiding them from yourself (to clean up the UI), from a casual shoulder-surfer, or from a dedicated snooper?
Method 1: Use Terminal to Hide a Folder on Mac (Native OS Method)
The `chflags` (change flags) command alters the metadata of a folder to make it invisible to Finder. This is the most robust way to hide a folder in Mac without installing software.
- Open Terminal (found in Applications > Utilities, or via Spotlight search).
- Type the following command, ensuring you leave a space after the word "hidden". Do not press enter yet.
chflags hidden
- Open Finder, locate the folder you want to hide, and drag and drop it directly into the Terminal window. The path will auto-fill.
- Press Return. The folder will immediately disappear from your desktop or Finder window.
To reverse this, use the exact same process but replace hidden with nohidden. Alternatively, to temporarily view the hidden folder, press Cmd + Shift + . in Finder.
Method 2: Mac Folder Encryption via Disk Utility
If you need to password protect a folder, hiding it isn't enough. You must encrypt it. Apple provides a native way to do this using Disk Utility, though it essentially turns your folder into a virtual disk drive (.dmg).
- Open Disk Utility.
- In the top menu bar, click File > New Image > Image from Folder.
- Select the folder you want to lock permanently.
- Choose 256-bit AES encryption. You will be prompted to create a strong password.
- Set the Image Format to read/write if you plan to add files to it later.
- Save. You can now delete the original, unencrypted folder.
Limitations: This method is highly secure, but clunky. Every time you want to access the files, you have to "mount" the disk image, enter the password, edit the files, and then remember to "eject" the disk image when you are done. If you forget to eject it, the folder remains wide open.
The Tool We Recommend for Most Mac Users
The Terminal is great for simple hiding, and Disk Utility offers strong encryption, but both are cumbersome for daily use. If you regularly need to lock, hide, and access sensitive files on the fly across all your devices, a dedicated security tool is significantly faster.
- 📁 Financial_2026.pdf 🔒 Locked & Hidden
- 🖼️ Private_Photos 🔒 Locked
Folder Lock combines military-grade encryption with a simple toggle switch to hide or lock files instantly.
Why Dedicated Folder Locking Matters for Privacy
When you use a dedicated app like Folder Lock instead of native macOS workarounds, you gain several security layers and conveniences that Apple doesn't provide out of the box.
Advanced Data Security
AES-256 File Encryption
When a folder is locked, its contents are scrambled. Even if an attacker uses data recovery tools to bypass the OS, the raw data remains unreadable.
On-the-Fly Memory Decryption
Protected materials are decrypted directly within your system's RAM rather than writing temporary files to your hard drive, ensuring no traces are left behind after you close the application.
Digital Wallets & Notes
Beyond standard folders, you can generate protected containers specifically designed for sensitive text, such as financial details, credit card numbers, and confidential passwords.
Cloud & Sharing Capabilities
Secure Cloud Synchronization
Seamlessly connect your local encrypted vaults with Dropbox, OneDrive, or Google Drive. Your data is encrypted locally before ever reaching the cloud server.
Cross-Device Ecosystem
Maintain access to your locked directories regardless of the hardware you are using. The protection extends across Windows, Android smartphones, iPhones, and iPads.
Password-Free Sharing
Distribute secured files to colleagues without exposing your master credentials. The system uses unique cryptographic keys to grant access only to authorized recipients.
Folder Lock vs File Encryption — Key Differences
Compare the built-in Mac methods against dedicated folder lock software to see which fits your workflow.
Terminal (`chflags`)
Best for cleaning up your desktop. Not suitable for sensitive data, as anyone who knows the `Cmd + Shift + .` shortcut can reveal the files instantly.
Disk Utility (.dmg)
Excellent free security, but highly frustrating for daily use due to the manual mounting and ejecting process required to access files.
Folder Lock
Combines the invisibility of the Terminal method with the security of Disk Utility, wrapped in an interface that takes seconds to use.
Mac File Security Deep Dive
Understanding how macOS handles file permissions and security layers is crucial for ensuring your sensitive data is actually protected.
FileVault is Apple's full-disk encryption. It protects your entire hard drive when your Mac is turned off. However, once you log into your user account, FileVault decrypts everything on the fly. This means if you step away from your desk and someone accesses your unlocked Mac, FileVault provides zero protection for individual folders. You still need a folder password software or native locks for in-session privacy.
Folders hidden via the Terminal `chflags` command generally persist across standard macOS updates (like moving from Sonoma to Sequoia). However, major OS migrations or using Migration Assistant can sometimes reset metadata flags, making hidden folders visible again. Folders encrypted via Disk Utility or third-party apps like Folder Lock remain encrypted and locked regardless of OS updates.
If you keep your private folders in iCloud Drive or Dropbox, native Mac hiding methods do not hide the files on the server side. End-to-end encryption means the files are scrambled on your Mac using a key only you possess, before being uploaded to the cloud. Folder Lock provides this local encryption, ensuring that even if your cloud provider is breached, your files cannot be read.
Common Mistakes & Troubleshooting
If you run into issues while trying to hide or lock a folder on your Mac, consult this reference guide.
1. Access to the folder is denied (or compressed folder is denied)
If you see an "access to the folder is denied" error on macOS, it usually means your user account lacks the Read/Write permissions for that specific directory, often caused by moving files from an older Mac. Fix: Right-click the folder, select Get Info. Unlock the padlock at the bottom right using your Mac password. Under Sharing & Permissions, ensure your username is set to "Read & Write".
2. Macbook Pro notes: Hide folders option missing
In the Apple Notes app, you can lock individual notes, but you cannot hide entire folders natively within the app as of 2026. Fix: You must move sensitive text files out of Notes and into a dedicated encrypted folder on your hard drive to achieve true invisibility.
3. Recovering from a forgotten folder lock password
If you used Disk Utility and forgot the password, and did not save it to your Keychain, the data is permanently lost. Apple cannot recover it. If you use third-party folder lock software, check your vendor's policy. Some offer license-key based recovery options if you can verify ownership of the account email.
4. I hid a folder via Terminal and can't find it
If you forgot where you put a folder hidden via Terminal, open Finder, navigate to your root Macintosh HD directory, and press Cmd + Shift + .. This toggles the visibility of all hidden system files. You will likely see faded folder icons—these are your hidden folders. You can then drag them back into Terminal and run the chflags nohidden command to restore them.
Folder Lock: Free vs Full Version
Determine if the free capabilities are sufficient for your Mac, or if upgrading provides the security you need.
Free Version
- Up to 1 GB of secure locker storage
- Synchronization across 2 devices
- Basic cross-platform application access
- No expiration date on core hiding features
Full License
- Unlimited storage capacity for your locked files
- Multi-device syncing for up to 5 devices
- Secure file sharing capabilities
- Digital wallets and confidential notes protection
Multi-User / Network Drives
For agencies migrating content to the cloud securely or managing shared Mac networks. Includes volume licensing, admin recovery tools, and cross-platform compatibility (Windows 7/10/11/Mac).
Contact for Volume PricingFrequently Asked Questions
Native Mac Methods
You can add a period (.) to the beginning of any folder name (e.g., changing "Taxes" to ".Taxes"). macOS treats any file or folder starting with a period as a system file and hides it automatically. However, Finder will warn you before allowing this name change.
If you just want a clean desktop, you can hide all desktop icons using Terminal: defaults write com.apple.finder CreateDesktop false and then killall Finder. To reverse it, change 'false' to 'true'.
Yes, applying the chflags hidden Terminal command to a specific folder located on your desktop will make it vanish from the desktop view while remaining in its directory location.
Software & Encryption
Hiding a folder removes it from visual interfaces (Finder, Desktop). It is not encrypted. Locking a folder (via Disk Utility or Folder Lock) encrypts the contents with a cryptographic key, meaning even if someone finds the file, they cannot open the documents inside without the password.
Comprehensive tools operate across the entire technological spectrum. You can manage your encrypted vaults on macOS (version 13 and above), Windows systems, as well as mobile devices running iOS and Android.
Yes. Premium security software integrates directly with popular cloud providers. The crucial benefit is that the software scrambles your data on your Mac first, ensuring that the files uploaded to Dropbox or Google Drive are completely unreadable to the cloud provider or any potential interceptors.
Native Mac methods like Terminal commands do not have size limits. However, free tiers of dedicated encryption software typically cap your protected storage vault at 1 GB. Upgrading to a premium license removes this restriction entirely.
Troubleshooting
Open Finder and navigate to the directory where you suspect the hidden folder resides. Press the keyboard shortcut Command + Shift + . (period). All hidden files and folders will appear slightly grayed out. Press the shortcut again to re-hide them.
If you are using a third-party application, look for a "Forgot Password" or "Master Key" option in the software's settings. If you used macOS Disk Utility encryption, there is no password reset mechanism; the data is inaccessible without the original password.
The Bottom Line
If you simply want to tidy up your Mac and hide a folder from casual view, the built-in Terminal chflags hidden command is fast, free, and effective. However, if you are storing tax documents, client files, or personal photos, hiding is not security.
For true peace of mind, encrypting your files is mandatory. While macOS Disk Utility can do this, a dedicated tool like Folder Lock streamlines the process, allowing you to secure files with a single click rather than wrestling with disk images.