Make a hidden folder on Android

There are two kinds of hidden folder on Android. One just stops the gallery showing what is inside. The other is locked, so nobody can open it without a code. Most phones already have a free locked one. Here are five ways, starting with the one almost every Android phone has.

Short answer

For a locked folder on almost any Android phone, use Safe folder in the Files by Google app: Collections, Safe folder, set a PIN or pattern, then move files in. On a Samsung phone you also have Secure Folder; on Android 15 and later, private space. A .nomedia file only hides a folder from the gallery and does not lock it. A vault app adds a recovery option and a backup file that moves to another phone.

On this page

Five ways, side by side

AppLockedWorks onIf you forget the codeMoves to a new phone
Safe folder (Files by Google)Yes, PIN or patternAndroid 8.0 and laterFiles cannot be opened, per GoogleNo: Google warns against copying its files to a new phone
Secure FolderYes, its own lockGalaxy phonesReset with Samsung account, if it was onSmart Switch, to another phone with Secure Folder
Private spaceYes, its own lock or the screen lockAndroid 15 and laterReset the space, which deletes itNo: not restored from a device backup
.nomedia fileNo, only hidden from the galleryAny Android phoneNothing to forgetYes, it is a normal folder
AlterVaultYes, its own codeAndroid 8.0 and later, and iPhone12-word recovery phraseYes, as one encrypted backup file

Sources: Files by Google Help: Protect your files with Safe folder, Samsung: Use the Secure Folder on your Galaxy phone or tablet, Android Help: Hide sensitive apps with private space

1. Safe folder in Files by Google (free, on most phones)

Google's Files app has a locked folder built in. Google says it is available on Android 8.0 and up, and keeps files secure using Android storage with encryption.

  1. Set it up

    Open Files by Google, scroll to Collections, tap Safe folder, choose PIN or Pattern, enter it twice, and tap Got it.

  2. Move files in

    Touch and hold the files (in grid view) or tap More next to a file (in list view), then More, Move to Safe folder, and confirm with your PIN or pattern.

  3. Open it

    Collections, Safe folder, then your PIN or pattern.

Google's own warnings: if you forget the PIN or pattern, you cannot access the files, and resetting the Safe folder permanently deletes them. Its files cannot be shared or backed up to Google Drive from inside it, other apps cannot open them, and screenshots are blocked. Google also says anyone who gains unauthorized access to the phone's internal storage may be able to access them, and that you should not copy its encrypted files from an old phone to a new one.

Sources: Files by Google Help: Protect your files with Safe folder

2. Secure Folder (Samsung)

On a Galaxy phone, Secure Folder is a separate locked space for photos, videos, files and apps, protected by Samsung Knox, with its own PIN, password or pattern. Its setup has you sign in to a Samsung account. Samsung says backing up Secure Folder data is no longer supported. Our Secure Folder guides cover setup, a forgotten PIN and moving to a new phone.

Sources: Samsung: Use the Secure Folder on your Galaxy phone or tablet

3. Private space (Android 15 and later)

Private space hides whole apps behind a second lock, not a single folder. To keep files there, you use apps installed inside the space, such as a file manager or gallery, ideally signed in to a separate Google Account, as Google recommends. If you forget its lock, the way out Google describes is to reset the space, which deletes it.

Sources: Android Help: Hide sensitive apps with private space

4. A .nomedia file (hides, does not lock)

Samsung's Gallery troubleshooting page describes a special file that hides folders: a file named .nomedia inside a folder stops the Gallery and other apps scanning that folder for media. That is why it is sometimes used to keep a folder out of the gallery.

It is not a lock. Anyone who opens the folder in a file manager sees everything in it, and the same Samsung page shows how to make hidden system files visible. Use it to tidy the gallery, not to protect anything.

Sources: Samsung: Pictures will not display in the Gallery app

5. A vault app

Locked and encrypted per file
AlterVault encrypts each photo, video and document with XChaCha20-Poly1305, with a key derived from its own code through Argon2id.
A way back in
If you forget the code, a 12-word recovery phrase you wrote down at setup gets you in. No account.
It moves
Your whole library writes to one encrypted backup file per vault, which you can copy to another phone.

We make AlterVault. It runs in the ordinary app sandbox, and its Android build holds the INTERNET permission for the purchase check through RevenueCat and for anonymous usage events sent to PostHog. Photos, file names and your code never touch the network.

Questions

How do I make a secret folder on Android?

Open Files by Google, go to Collections, tap Safe folder, and set a PIN or pattern. Then move files into it. Samsung phones also have Secure Folder, and Android 15 and later has private space.

Is Files by Google's Safe folder secure?

Google says it keeps files secure using Android storage with encryption, and that its files cannot be opened by other apps. Google also says anyone who gains unauthorized access to the phone's internal storage may be able to access them.

What happens if I forget my Safe folder PIN?

Google says you cannot access your files, and that resetting the Safe folder permanently deletes them.

Does a .nomedia file hide a folder?

It hides the folder's photos and videos from the Gallery and other apps that scan for media. It does not lock anything: a file manager still shows the folder and its contents.

Can I move my Safe folder to a new phone?

Google says not to copy encrypted Safe folder files from an old phone to a new one. Move the files out of Safe folder first, transfer them, then move them back in on the new phone.

Can I back up the Safe folder to Google Drive?

Not from inside it. Google says the Share and Back up to Google Drive options are not available in the Safe folder.

Locked, not just hidden

No account. Your photos stay on your phone.