.nomedia

How to Open NOMEDIA File on Android, Windows & Mac (.nomedia)

A .nomedia file tells Android's media scanner to exclude a folder; it is not a photo or video. To make existing media visible again, remove the marker if appropriate and let the gallery refresh. To hide a folder from scanning, create the marker. Deleting it cannot restore media that has already been deleted.

Category: Marker / convention file, not a format Defined by: Android (MediaStore / MediaProvider) Normal size: 0 bytes Works on: Android only

Choose what you need

How to open a NOMEDIA file

  1. Show hidden files. In Files by Google, open Settings and turn on Show hidden files. In Samsung My Files, tap โ‹ฎ > Settings and turn on Show hidden system files. On a Mac, press Command+Shift+. in Finder.
  2. Find it. Open the folder whose photos are missing from the gallery โ€” and its parent folders, since one marker hides everything below it.
  3. Check what's inside. Drop it into the checker above or open it in any text editor (Notepad, TextEdit, a phone text editor). Empty, or a single folder path, is normal.
  4. Keep it or delete it. Keep it to keep that folder out of your gallery; delete it and restart the phone to bring the folder's media back.
Your situationWhat to do
You found a .nomedia and want to know what it isIt's a harmless marker; check it with the free tool
Photos or music missing from the galleryDelete the .nomedia in that folder or a parent (how)
WhatsApp or Telegram photos not in the galleryCheck the app's gallery setting first (details)
You want to hide a folder from the galleryCreate a .nomedia in a subfolder you made (steps)
.nomedia in Pictures, DCIM or Download does nothingAndroid 12+ ignores it there (why)
You see .nomedia on a PC, Mac or SD cardIt came from Android and is harmless (details)

Open NOMEDIA File Online: See What's Inside or Create One (Free)

To open a NOMEDIA file here, drop it below to see its real size, SHA-256 hash and content as text and hex. The checker tells you whether the name is exactly right, whether the file is empty (the usual case) or holds a folder path written by Android's media provider (also normal), and flags anything unexpected. Or generate a genuine empty one to copy into a folder.

Before you use this tool: Removing the marker may require the gallery to rescan. It does not recover deleted photos, and hiding media from scanning is not the same as encrypting or protecting it from access.

๐Ÿ”’ Nothing is uploaded โ€” your file never leaves this device

Just need a working .nomedia file? This generates a genuine, empty (0-byte) file ready to move into any folder.

Heads up: many browsers strip the leading dot from downloaded filenames, saving it as nomedia instead of .nomedia. If that happens, rename the downloaded file back to .nomedia before moving it onto your device โ€” the content (0 bytes) is already correct either way.

What is a NOMEDIA file?

A NOMEDIA file is an empty marker file named exactly .nomedia that tells Android's media index to skip the folder it's in, plus every subfolder below it. Gallery, Google Photos, music and video apps find your pictures and songs through that shared index (Android's MediaStore, maintained by a system component called MediaProvider, the successor of the old MediaScanner). When the scanner walks your storage and meets a folder containing a file called .nomedia, it leaves that folder's photos, videos and audio out of the index.

Nothing else happens when you place one, or when you open a NOMEDIA file to look at it. The files aren't moved, renamed, encrypted or deleted, and they still show up in any file manager. They're only invisible to apps that browse media through the index rather than the raw folders. Android's own source code treats a folder as hidden in two cases: its name starts with a dot, or it contains a .nomedia file. That's why the name starts with a dot too: on Android, Linux and macOS a leading dot also hides the file itself in most file browsers.

Apps add these markers so their cache images, stickers, ad banners, ringtones or game graphics don't flood your photo grid, and people add them by hand to tidy folders such as work screenshots or scanned documents. Android itself puts one in its thumbnail folders, next to the hidden .database_uuid file.

What's inside a .nomedia file?

Usually nothing: a .nomedia file is 0 bytes, because Android only checks whether a file with that name exists. There are two normal exceptions you may see when you open NOMEDIA files in a text editor:

  • A single folder path, such as /storage/emulated/0/Movies/Clips. On Android 12 and later, MediaProvider writes the folder's own path into an existing marker to remember that the folder has already been scanned, and clears it again when the folder needs a rescan. It's bookkeeping, not malware, and the marker keeps working.
  • A short note someone typed, or the content of another file that was renamed to .nomedia by mistake. Android ignores the content for hiding purposes; the folder is hidden either way.

Because the file is so small, any program that opens text can open NOMEDIA files: Notepad or WordPad on Windows, TextEdit on Mac, or a text editor app on Android. "Opener" programs that some file-extension sites list for NOMEDIA, such as video players or PDF readers, show nothing useful.

Illustration: a .nomedia file copied from an Android 12+ phone, opened in Notepad. The only content is the folder's own path, written by Android's media provider.

Can I delete a .nomedia file? (make photos reappear)

Yes. Deleting a .nomedia marker never deletes or damages any photo, video or song โ€” it only lets that folder back into the media index, so its contents reappear in your gallery and music apps. File names that start with a dot are hidden by default, so first tell your file manager to show them โ€” the same step you need to open a .nomedia file on a phone:

  1. Files by Google: open the app, tap the menu (โ˜ฐ or your profile icon, depending on version) > Settings, and turn on Show hidden files.
    Samsung My Files: tap โ‹ฎ > Settings and turn on Show hidden system files.
  2. Browse to the folder whose photos are missing โ€” and check its parent folders too, since one marker hides everything beneath it.
  3. Long-press .nomedia (it shows as 0 bytes or a few bytes) and tap Delete.
  4. Restart the phone (or wait a while) so the media index picks the folder up again, then open your gallery.
Illustration: Files by Google with Show hidden files turned on. The 0-byte marker appears in the folder so you can long-press and delete it.

What happens after you delete it: the folder becomes a normal album again. If it was an app's cache or sticker folder, expect a flood of thumbnails and junk images, and the app may simply recreate the file the next time it runs. If that happens, put it back with the generator on this page. Deleting markers inside your phone's thumbnail folders is pointless: Android recreates them.

How to create a .nomedia file on Android to hide photos and videos

Put an empty file named exactly .nomedia into a folder you created yourself, and Android drops that folder from the gallery. Use your own subfolder, such as Pictures/Private, not a top-level folder like Pictures or DCIM (see where it's ignored).

  1. Create a new folder (for example inside Pictures or Documents) and move the photos or videos into it.
  2. In a file manager that can create files (many built-in ones only create folders; third-party apps such as Solid Explorer or Total Commander can), create a new empty file and name it exactly .nomedia.
  3. No "new file" option? Download a file with the generator above, rename it to .nomedia if the dot was stripped, and move it into the folder.
  4. Or skip the file entirely: rename the folder so it starts with a dot (for example .Private). Android treats dot-folders as hidden too.
  5. Force-stop or restart your gallery app if the photos don't disappear straight away.
Hidden isn't locked. Anyone who opens a file manager or plugs your phone into a computer can still see these files. For private photos, read the safer options.

How to create a .nomedia file from a PC or Mac (via USB)

  1. Connect the phone with a USB cable, unlock it and choose File transfer in the USB notification so the computer can see its storage.
  2. Use the generator on this page to download an empty file, or make one: on Windows, save an empty Notepad document as ".nomedia" (with the quotes) and Save as type: All files; if File Explorer refuses a name that starts with a dot, typing .nomedia. with a trailing dot works, because Windows removes the trailing dot.
  3. On Mac or Linux, run touch .nomedia in a terminal inside the target folder, or rename any empty file to .nomedia.
  4. Copy the file into the folder on the phone you want hidden, then restart the gallery app. The same USB connection lets you open .nomedia files already on the phone and delete them.

Why .nomedia doesn't work in Pictures, DCIM or Download

On Android 12 and later, the media provider ignores โ€” and actually deletes โ€” the marker in certain protected locations, so those folders always stay visible. This is in Android's open-source MediaProvider code (FileUtils.isDirectoryHidden), and it explains most "my .nomedia stopped working" reports:

Where the .nomedia file isAndroid 11 and earlierAndroid 12 and later
Top-level standard folders: Pictures, DCIM, Download, Movies, Music, Documents, Podcasts, Ringtones, Alarms, Notifications, Audiobooks, RecordingsFolder hiddenIgnored and deleted
DCIM/CameraFolder hiddenIgnored and deleted
A Screenshots folder at the top level or directly inside a standard folder (e.g. Pictures/Screenshots)Folder hiddenIgnored and deleted
The root of internal storageFolder hiddenIgnored and deleted (Android 13 and later)
Any other folder, e.g. Pictures/Private or WhatsApp/Media/WhatsApp ImagesFolder hiddenFolder hidden

The Screenshots rule exists because stray .nomedia files in screenshot folders caused trouble for some people after upgrading to Android 11. The fix for your own hiding is simple: put the photos in a subfolder and place the .nomedia there. MediaProvider is an updatable system module, so a phone can get newer behavior through system updates than its Android version suggests.

Common .nomedia problems and how to fix them

The photos are still showing up in my gallery

Open the NOMEDIA file in the checker on this page to confirm the exact filename โ€” it must be .nomedia, not nomedia, .nomedia.txt or . nomedia with a space. Make sure the folder isn't one of the protected locations. Then force-stop your gallery app (Settings > Apps) or restart the phone, since some galleries cache their own list.

My .nomedia keeps disappearing

On Android 12 and later, the system deletes .nomedia files in top-level standard folders, DCIM/Camera and the main Screenshots folders. Move the photos into a subfolder and put the file there instead.

I can't create a file starting with a dot

Many stock file managers hide dotfiles and won't let you type a leading dot. Use a file manager with a "new file" option, generate one on this page and transfer it, or rename the folder itself to start with a dot.

Deleting the marker didn't bring the media back

Look in parent folders for another .nomedia, and check that the folder name doesn't start with a dot. Then restart the phone so the media index is refreshed. Some apps (gallery or music players) also have their own "excluded folders" setting that works independently of .nomedia.

The marker keeps coming back after I delete it

An app is recreating it in its own folder, which is normal for caches (Telegram does this in its cache folder). Leave it, or change the app's own gallery setting instead.

Why WhatsApp, Telegram and other apps create .nomedia files

Apps create .nomedia files so their internal images, sounds and caches stay out of your gallery and music library. Messaging apps are where most people run into it, because they combine an in-app setting with .nomedia files.

WhatsApp photos not showing in the gallery

  1. In WhatsApp, tap โ‹ฎ > Settings > Chats and turn on Media visibility. It applies to newly downloaded media.
  2. Check individual chats: open the chat, tap the contact or group name, then Media visibility. A per-chat "No" overrides the global setting.
  3. On newer phones and WhatsApp versions, media lives in Android/media/com.whatsapp/WhatsApp/Media/ (older phones: WhatsApp/Media/). If images are there but still missing from the gallery, look for a .nomedia file in WhatsApp Images or a parent folder, delete it and restart the phone โ€” the fix Huawei's support site gives for missing WhatsApp albums.

Telegram

Telegram for Android creates a .nomedia marker in its cache folder, so photos and videos you view in chats don't appear in the gallery. To save them to the gallery automatically, turn on Save to Gallery under Settings > Data and Storage, with separate switches for private chats, groups and channels. To save a single item, open it, tap โ‹ฎ and choose Save to Gallery.

Other apps and Android itself

Music and podcast apps, games, browsers and ad libraries use the same trick for album art, sound effects and cached banners. Android adds one to its own thumbnail folders, next to the .database_uuid file. Deleting any of these markers is harmless, but the folder's junk images will show up in your gallery until the app puts the marker back.

Does a .nomedia file stop Google Photos from backing up a folder?

Don't rely on it. Google's help pages don't mention .nomedia at all, so how Google Photos treats a hidden folder isn't documented. If you want to be sure a folder isn't uploaded, use the app's own control:

  1. In Google Photos, tap your profile picture > Photos settings > Backup > Back up device folders.
  2. Turn off the folder you don't want uploaded (and turn off Back up all device folders if it's on, so new folders aren't added automatically).
  3. Anything already backed up stays in your Google account. Delete it from Google Photos too if you want it gone from the cloud.

For photos you want hidden and backed up, Google Photos' Locked Folder is the right tool: it can now be backed up to your account, and its items don't appear in the Photos grid or in other apps.

Android 11+ scoped storage and the Android/data folder

Since Android 11, "scoped storage" stops file manager apps from reaching other apps' private folders, which is why you sometimes can't open NOMEDIA files there, or delete them, from the phone itself:

  • Even apps with All files access (MANAGE_EXTERNAL_STORAGE), the permission file managers use, can't open other apps' Android/data folders, and apps can no longer ask you to pick files from Android/data or Android/obb.
  • Android/media, where WhatsApp and other apps now keep shareable media, is still reachable in most file managers โ€” that's where to look for a marker hiding chat photos.
  • To reach a restricted folder and open a NOMEDIA file inside it, connect the phone to a computer with a USB cable, choose File transfer on the phone, and browse it from the computer.
  • The .nomedia rules themselves didn't change in Android 11; the protected-folder exceptions arrived with Android 12's media provider (see the table).

Open NOMEDIA files on Windows, Mac, iPhone or an SD card

Outside Android, the marker does nothing at all โ€” it's an empty file that came along when you copied folders from a phone or moved its memory card.

  • Windows: File Explorer lists it as a 0 KB "NOMEDIA File". Windows Photos ignores it, so the folder's pictures show normally on the PC. To open NOMEDIA files on Windows, right-click > Open with > Notepad. Delete it here to unhide the folder on the phone, or copy it into another folder to hide that one.
  • Mac: Finder hides names that start with a dot. Press Command+Shift+. in a Finder window to show or hide them; to open a NOMEDIA file on a Mac, use TextEdit.
  • iPhone / iPad: iOS has no equivalent and ignores the file. If a .nomedia ends up in the Files app after copying a folder, it's harmless and can be deleted.
  • SD cards and cameras: a card moved from an Android phone may carry these markers; cameras and other devices ignore them. Put the card back in an Android phone and those folders are hidden again.
  • Plex, Jellyfin and Emby: media servers don't document .nomedia support. They use their own markers: .plexignore in Plex, an empty .ignore file in Jellyfin, and .ignore (Emby 4.8) or .embyignore (Emby 4.9 and later).
Illustration: an Android phone browsed from Windows File Explorer over USB. The .nomedia marker shows up as a 0 KB "NOMEDIA File" you can delete or copy.

Is a .nomedia file a virus?

No. A .nomedia marker contains no code and can't run; it's an empty marker that Android's own media provider looks for. Finding dozens of them on a phone or a copied SD card is normal, because apps and Android itself create them. The worst it can do is hide a folder's photos from your gallery, which you undo by deleting it. If a file named .nomedia is large or contains something other than a folder path or a short note, open the NOMEDIA file in the checker on this page: it's most likely a different file that was renamed.

.nomedia vs hidden (dot) folders

Both keep a folder's media out of Android's index, including subfolders, but they behave differently.

.nomedia file inside a folderFolder renamed to start with a dot
Hidden from gallery & music appsYesYes
Folder name changesNoYes (apps using the old path may break)
Folder hidden in file managersNo, only the marker isYes, in most file managers
Works in Pictures, DCIM, Download (Android 12+)No, it's deletedOnly for subfolders you rename
Easy to undoDelete one fileRename the folder back

Single files work the same way: a photo whose name starts with a dot, such as .receipt.jpg, is also left out of the media index.

Is .nomedia a good way to hide private photos?

Not really. The marker only keeps a folder out of gallery-style apps on that one phone. Anyone with a file manager, a computer and a USB cable, or access to a backup that includes the folder can still see every file. For genuinely private photos, use a feature built for it:

  • Google Photos Locked Folder โ€” protected by your screen lock; items don't appear in the Photos grid, search or albums or in other apps, and you can choose to back it up (Android 6 and later).
  • Samsung Secure Folder on Galaxy phones โ€” a separately locked area for files and apps.
  • Android 15's private space โ€” a separate profile with its own lock whose apps and files are kept apart from the main space and hidden while it's locked.

Use .nomedia for what it's good at: keeping clutter such as app caches, ringtones, document scans or work screenshots out of your photo grid.

Sources and technical references

.nomedia is an Android convention, not a file format, so the authoritative sources are Android's own documentation and source code, plus the app makers' help pages.

Frequently asked questions

What is a .nomedia file?

A .nomedia file is an empty marker file that tells Android's media index to skip the folder it sits in and every subfolder below it. Photos, videos and audio there stop appearing in gallery, Photos and music apps, but the files stay exactly where they are and remain visible in file managers.

How do I open a .nomedia file?

You don't need to, because there's nothing to open. Most .nomedia files are 0 bytes, and on Android 12 and later some contain one line of text: the folder's own path. To check one, drop it into the free tool on this page or open it in any text editor such as Notepad or TextEdit.

Can I delete a .nomedia file?

Yes. Deleting a .nomedia file never deletes or damages any photo. The folder's pictures, videos and music simply return to your gallery once Android rescans it, which may take a restart. If it was an app's cache folder, expect thumbnails or stickers to appear, and the app may recreate the file.

Why isn't my .nomedia file working?

Check three things. The name must be exactly .nomedia, not nomedia or .nomedia.txt. Android 12 and later ignore and delete it in top-level folders like Pictures, DCIM, Download and Music, in DCIM/Camera and in the main Screenshots folders. And your gallery app may need a restart before its list updates.

How do I hide photos from the gallery with .nomedia?

Move the photos into a subfolder you create yourself, such as Pictures/Private, then put an empty file named .nomedia inside it, or simply rename the folder so it starts with a dot, like .Private. Restart the gallery app. Remember that anyone using a file manager can still open the photos.

Why are my WhatsApp photos not showing in my gallery?

Usually WhatsApp's Media visibility is off. Turn it on under Settings > Chats > Media visibility, and check each chat's own Media visibility option; it affects newly downloaded media. If photos still don't appear, look for a .nomedia file in WhatsApp's Media folders, delete it and restart the phone.

Does .nomedia stop Google Photos from backing up a folder?

Don't rely on it: Google doesn't document how Google Photos treats .nomedia. To keep a folder out of backup, turn it off under Photos settings > Backup > Back up device folders. Anything already backed up stays in your Google account until you delete it from Google Photos as well.

Is a .nomedia file a virus?

No. A .nomedia file is an empty marker that Android's own media provider looks for; it contains no code and can't run. Apps such as Telegram create one in their cache folders, and Android adds them to its thumbnail folders. The only thing it can do is hide a folder's media from gallery apps.

Why can't I find or delete a .nomedia file in Android/data?

Since Android 11, file manager apps can't open other apps' Android/data folders, even with All files access. Connect the phone to a computer with a USB cable, choose File transfer, and browse the folder from the computer. WhatsApp's shareable media lives in Android/media, which most file managers can still open.

Why is there a .nomedia file on my PC or SD card?

It came from an Android phone. When you copy folders or move a memory card, the hidden .nomedia marker travels along. Windows, macOS and cameras ignore it, so the folder's photos show normally there. You can keep or delete it; it only matters if the folder goes back to an Android device.

Does .nomedia work on iPhone, Windows, Plex or Jellyfin?

No. It's an Android convention, and iOS, Windows and macOS treat it as an ordinary empty file. Media servers use their own markers instead: Plex reads .plexignore, Jellyfin an empty .ignore file, and Emby .ignore (4.8) or .embyignore (4.9 and later). Use those to hide a folder from a media library.

What's the difference between .nomedia and a dot folder?

Both hide a folder's media from Android's media index, including all subfolders. A .nomedia file leaves the folder name unchanged, but Android 12 and later ignore it in top-level folders such as Pictures or DCIM. Renaming a folder to start with a dot also hides the folder itself in most file managers.

Is .nomedia a safe way to hide private photos?

No. It only hides a folder from gallery apps on that phone, and anyone with a file manager or a USB cable can still open the files. For real privacy use Google Photos' Locked Folder, Samsung Secure Folder, or Android 15's private space, which keep content behind a lock.

Last updated .