How to lock and hide files on Android phones & tablets
If you want to keep sensitive photos, videos, or documents private on a Google Pixel, Motorola, Xiaomi, or any Android phone or tablet, you don't need to download sketchy third-party vault apps. Android includes a built-in feature called Safe folder inside the Files by Google app.
Safe folder uses 256-bit encryption and locks your private files behind a 4-digit PIN or pattern. Once moved into the Safe folder, these files are hidden from gallery apps, file managers, and cloud backups.
Here is how to set up Safe folder, move files into it, and three critical warnings you need to know before using it.
How to set up Safe folder in Files by Google
- Open the Files by Google app on your phone or tablet. (If not pre-installed, download it from the Google Play Store).
- Scroll down to the Collections section and tap Safe folder.
- Choose a lock type: PIN (4 digits) or Pattern.
- Enter your PIN or pattern.
- Tap Next.
- Confirm it a second time.
- Tap Next.
- Tap OK to complete the setup on your device.
How to move photos, videos, and files into Safe folder
- Open the Files by Google app.
- Select a category (e.g., Images, Videos, or Documents) or tap Internal storage to locate your file.
- Tap and hold the file(s) you want to hide to select them.
- Tap the three-dot menu button in the top-right corner.
- Select Move to safe folder.

- Enter your PIN or pattern to confirm.
Your files will immediately disappear from your main storage, gallery apps, and media players.
How to view or restore files from Safe folder
How to view hidden files:
- Open the Files by Google app.
- Go to the Collections section.
- Tap Safe folder.
- Enter your PIN or pattern.
- Tap Next.
- Tap any file to view, open, or play it.
How to move files out of Safe folder:
- Inside Safe folder, tap the three-dot menu button next to the file you want to restore.
- Select Move out of safe folder.
The file will return to its original folder location and reappear in your photo gallery or Files app.
Critical warnings: 3 things you must know before using Safe folder
- No cloud backups: Files moved into the Safe folder are automatically removed from Google Photos and Google Drive backups. They exist strictly on your local device storage.
- Uninstalling the app permanently deletes your files: If you uninstall the Files by Google app or clear its storage data in system settings, everything in your Safe folder will be permanently deleted.
- No password recovery: Google does not provide a reset option for forgotten Safe folder PINs. If you forget your code, you cannot recover your hidden files.
What happens if you forget your Safe folder PIN?
Because the Safe folder uses hardware-grade encryption, there is no "Forgot PIN" or email recovery option. If you forget your lock code, the only way to use the feature again is to reset the Safe folder in the app settings—which will permanently erase all files currently stored inside it.
To reset a locked Safe folder:
- Open Files by Google.
- Tap the hamburger menu (≡) in the top-left corner.
- Select Settings.
- Scroll down and tap Safe folder.
- Tap Reset safe folder.
- Tap Reset to confirm.
Related:
How to block ads on any Android phone or tablet (no app)
References: