.database_uuid

How to Open DATABASE_UUID File: Android's .database_uuid (Database UUID) Explained

A .database_uuid file is a tiny hidden text file Android writes into its .thumbnails folders. It holds one random database UUID that tells Android whether the cached thumbnails there still belong to the phone's media database. To open DATABASE_UUID files, read them with any text editor or the free checker below; they're harmless and safe to delete.

Category: Android system / cache marker file Created by: Android MediaProvider (Android 11+) Content: one 36-character UUID, UTF-8 text Safe to delete: yes

Open DATABASE_UUID File Online: Read & Check the UUID (Free)

Open DATABASE_UUID files right here: drop a .database_uuid file below to see the exact UUID inside, its size and encoding, whether it's a valid RFC 9562 version 4 UUID, and whether Android will accept it or throw away the thumbnails next to it. Select several .database_uuid files at once to check whether they came from the same phone. Files from a .thumbnails folder work too: old .thumbdata caches are unpacked into viewable JPEG thumbnails, and <number>.jpg thumbnails are identified.

🔒 Nothing is uploaded — your file never leaves this device

What is a .database_uuid file?

A .database_uuid file is a hidden marker file created by Android's MediaProvider, the system component that indexes your photos, videos and music. It contains a single UUID (universally unique identifier) that names the phone's current media database. Android's source code describes it as the file "where the current value of DatabaseHelper#getOrCreateUuid is persisted on a physical SD card to help identify stale thumbnail collections."

In plain English: Android keeps small preview images (thumbnails) in folders called .thumbnails. Those previews are only valid for the media database that made them. The .database_uuid file is the label on the box. If the label matches the phone's database, the thumbnails are kept; if it doesn't (say, after a factory reset or after the SD card moved to another phone), Android throws the old thumbnails away and writes a new label.

You only need to open a DATABASE_UUID file if you're curious or worried about it. It isn't a database itself, it isn't related to WhatsApp or any app you installed, and it has no settings or personal data in it. The name just means "the UUID of the database."

How to open a DATABASE_UUID file

Short answer: a .database_uuid is plain text, so any text editor opens it, and the checker above also tells you whether it's valid. You don't need special software to open DATABASE_UUID files:

  1. Find it: on the phone or SD card, look in Pictures/.thumbnails, Movies/.thumbnails or Music/.thumbnails. Turn on hidden files first, because names starting with a dot are hidden on Android.
  2. Copy it to your computer rather than editing the original on the phone.
  3. Read it: drop the copy into the free checker, or open it with Notepad (Windows), TextEdit (Mac) or any text editor. You'll see one line like 3f2b8c1e-9a4d-4e7b-b1c2-6d5e8f9a0b7c.
  4. Don't save changes. Leave the file alone, or delete it if you're cleaning up. Android recreates it automatically.
Your situationWhat to do
Saw .database_uuid on your PC after plugging in the phoneNothing; it's normal (why it shows on Windows)
Found it on an SD card or in a backup copySafe to keep or delete (details)
Want to know what's insideUse the checker or a text editor
Worried it's malwareA real one is 36 bytes of text (how to check)
Big .thumbdata files in DCIM/.thumbnailsOld thumbnail cache; view or delete (more)
Gallery shows wrong or blank previewsClear the thumbnail cache (how)

What's inside: the database UUID, byte by byte

A genuine .database_uuid contains exactly 36 characters and nothing else: no line break, no header, no byte-order mark. That makes the file 36 bytes long. Android creates the value with Java's UUID.randomUUID().toString(), which the Java documentation defines as a "type 4 (pseudo randomly generated) UUID," and writes it as UTF-8 text.

Anatomy of the UUID in a .database_uuid file The 36-character UUID 3f2b8c1e-9a4d-4e7b-b1c2-6d5e8f9a0b7c split into five groups of 8, 4, 4, 4 and 12 hex digits. The first digit of the third group, 4, is the version. The first digit of the fourth group, b, encodes the RFC 9562 variant. .database_uuid = 36 bytes of text 3f2b8c1e - 9a4d - 4e7b - b1c2 - 6d5e8f9a0b7c 8 hex4 hex4 hex4 hex12 hex Version digit = 4 random UUID (UUIDv4) Variant digit = 8, 9, a or b RFC 9562 layout (bits 10) 32 hex digits + 4 hyphens = 36 characters The other 122 bits are random
Illustration: how the UUID inside a .database_uuid file is structured (example value).
Size36 bytes
EncodingUTF-8 (only ASCII characters are used)
Format8-4-4-4-12 hex digits separated by hyphens
UUID typeVersion 4 (random), RFC 9562 variant
Line break at the endNone
Where else Android keeps itIn an extended attribute (user.uuid) on the media database file itself

When you open a DATABASE_UUID file, the two digits highlighted above are the only fixed parts. RFC 9562, the May 2024 standard that replaced RFC 4122, puts the version number in the 13th hex digit and the variant in the 17th. Everything else is random, so a .database_uuid reveals nothing about you, your phone model or your files. The checker on this page reads both fields and flags anything that isn't a real version 4 UUID.

The same random value also feeds into the version string Android returns to apps from MediaStore.getVersion().

How Android uses .database_uuid to spot stale thumbnails

Android checks every .database_uuid when a storage volume is attached (for example when the phone starts or an SD card is inserted) and again during idle maintenance, a background job that runs while the device is idle and charging. The logic, from the ensureThumbnailsValid() method in MediaProvider, is simple:

How Android checks a .database_uuid file Android reads the .database_uuid in each .thumbnails folder. If the file is missing, Android keeps the thumbnails and writes the current UUID. If it matches the database UUID, nothing changes. If it differs, Android deletes the thumbnails in that folder and writes the current UUID. Storage attached or idle job runs Read .thumbnails/.database_uuid Compare with the database's UUID (exact text match) File missing (or over 4 KB) Same UUID thumbnails valid Different UUID (or empty / edited) Keep thumbnails write current UUID Do nothing Delete thumbnails in that folder, write current UUID .nomedia and .database_uuid are never deleted in this step
Illustration: the decision Android's MediaProvider makes for each .thumbnails folder.

This is also why it's fine to open DATABASE_UUID files but not to save them. Two practical consequences follow from that code. First, deleting the file is harmless: a missing .database_uuid is treated as "assume the current thumbnails are fine," and the file is simply rewritten. Second, editing it is not: the comparison is an exact text match, so a line break or space added by a text editor counts as a different UUID and makes Android discard that folder's thumbnails. They regenerate as you browse, so even then nothing is lost but a bit of time.

The UUID changes whenever the media database is created from scratch, for example after a factory reset or after clearing the media storage data. That's exactly when old thumbnails stop matching the media IDs they were saved under, and it's why the file exists.

Where .database_uuid files are found

In the Android Open Source Project code, MediaProvider writes a .database_uuid into three folders on every storage volume it manages, internal storage and SD cards alike, creating the folders if they don't exist:

FolderWhat it cachesExample path on the phone
Pictures/.thumbnailsPhoto thumbnails/storage/emulated/0/Pictures/.thumbnails/.database_uuid
Movies/.thumbnailsVideo thumbnails/storage/emulated/0/Movies/.thumbnails/.database_uuid
Music/.thumbnailsAlbum art/storage/emulated/0/Music/.thumbnails/.database_uuid
DCIM/.thumbnailsLegacy thumbnails and .thumbdata files (Android 9 and earlier)Not a location where AOSP writes .database_uuid

If you open DATABASE_UUID files from all three folders on one phone, you'll see the same UUID, because MediaProvider keeps a single database for all external storage. Generated thumbnails themselves are always saved to the phone's primary storage, so on an SD card you'll usually find .thumbnails folders that contain only a .database_uuid and a .nomedia file. That is why people notice these folders after inserting a card into an Android phone, or after copying a card's contents to a computer.

The file first appears in MediaProvider for Android 11; the Android 10 version of the same code doesn't contain it. Since Android 11, MediaProvider is a Mainline module that Google can update separately from the rest of the system. If you find a .database_uuid somewhere else, such as DCIM/.thumbnails, keep in mind that phone makers can modify their media software, so the exact folders can vary between brands.

Open DATABASE_UUID files on Windows 11 and 10

Windows shows the .database_uuid file because it doesn't follow Android's "dot means hidden" rule. On Android and other Unix-like systems a name that starts with a dot is hidden; Windows instead uses a separate hidden file attribute, which these files don't have. So when you plug in your phone or an SD card reader, the .thumbnails folder and its contents show up in File Explorer.

  1. In File Explorer, open This PC > your phone > Internal shared storage > Pictures > .thumbnails (or the SD card's drive letter).
  2. Copy .database_uuid to your Desktop, so you never risk saving changes to the original on the phone.
  3. Right-click the copy > Open with > Notepad, or drop it into the checker.
  4. Close Notepad without saving. If Windows asks "How do you want to open this file?", that just means no app is set for this extension.
Illustration: a phone's Pictures\.thumbnails folder in File Explorer, and the .database_uuid file opened in Notepad.

The same steps open DATABASE_UUID files copied from an SD card or a phone backup. If you want Windows to hide these folders again, there's nothing to switch: they aren't marked hidden, so the "Hidden items" option in File Explorer's View menu doesn't affect them. Just ignore them; they're tiny.

Open .database_uuid on Mac and Linux

On a Mac, Finder hides names that start with a dot, so the file may look missing on an SD card. Press Command+Shift+. (period) in Finder to show hidden files, then open the .database_uuid with TextEdit or drag it onto the checker above. On Linux, or in the Mac Terminal, print it directly:

Illustration: reading the file in a terminal. The extra echo adds a line break because the file itself ends without one.

Either way you open DATABASE_UUID files read-only, which is all they need. If wc -c reports 36, the file is untouched. Anything else means it was edited or isn't a real one; the checker shows exactly which characters are extra.

Open DATABASE_UUID files on Android

On the phone itself, file managers hide dot-files by default. To see the file, turn on the "show hidden files" option in your file manager's settings (Files by Google and most other file managers have one), then go to Internal storage > Pictures > .thumbnails. Open it with any text viewer, or copy it to a computer and use the checker.

Illustration: a file manager with hidden files turned on, showing the contents of Pictures/.thumbnails.

Whichever app you use to open a DATABASE_UUID file on the phone, avoid editing it there. Some text editors add a line break when saving, which makes Android treat the UUID as different and wipe that folder's thumbnails. If you want it gone, delete it instead.

Can I delete .database_uuid?

Yes. Deleting a .database_uuid never affects your photos, videos or music. When MediaProvider finds the file missing, it assumes its current thumbnails are valid and writes a fresh copy, so the file will reappear the next time the storage is attached or the idle maintenance job runs. Recreating it is the intended behavior, not a sign of malware.

  • On an SD card or USB backup you're archiving: delete the .thumbnails folders entirely if you like. They only contain cache data and markers.
  • Before deleting: you don't need to open DATABASE_UUID files first; nothing inside is worth saving.
  • On a phone you're using: there's no benefit to deleting it. It's 36 bytes, and Android will just put it back.
  • Before selling or giving away an SD card: deleting it is fine, though the UUID is random and identifies nothing about you.

Deleting the cached <number>.jpg files in the same folder is also safe. Android builds new thumbnails when an app asks for them, so the only effect is that galleries may load previews a little slower the first time.

Is .database_uuid a virus?

No. A genuine .database_uuid is 36 bytes of plain text containing one random ID. It can't execute, it isn't loaded by any app as code, and it is created by Android's own media system. People worry about it mainly because it's an unfamiliar hidden file that appears without explanation.

To be certain, open the DATABASE_UUID file in the checker and check three things: the size is 36 bytes, the content is a single UUID, and the version digit is 4. If a file named .database_uuid is large, contains readable words or program code, or sits somewhere unusual next to executable files, treat it like any unknown file and scan it with your security software.

The .thumbnails folder: .thumbdata, .jpg and .nomedia files

The .database_uuid file shares its folder with up to three other kinds of files. Here's what each one is and where it comes from:

FileWhat it isAndroid versionsSafe to delete?
.database_uuidID of the media database that owns the thumbnails11 and laterYes (recreated)
<number>.jpgOne thumbnail; the number is the media item's ID in MediaStore10 and later (Pictures, Movies, Music)Yes (regenerated)
.nomediaStops the media scanner from listing thumbnails as photos11 and later (created by the scanner)Yes, but it comes back
.thumbdata3-…, .thumbdata4-…Old single-file thumbnail cache in DCIM/.thumbnails9 and earlierYes

What's inside a .thumbdata file

On Android 9 and earlier, a component called MiniThumbFile stored small previews in one big file per media type, named .thumbdata + version + - + a hash, for example .thumbdata4--1967290299. The source code reserves a fixed 10,000-byte slot for every media ID: 1 byte flag, an 8-byte check value, a 4-byte length and then the JPEG image. Because every slot is the full 10,000 bytes even when the JPEG is much smaller, and slots exist for every ID up to the highest one, the file grows with the highest media ID: a phone whose IDs reach 20,000 needs about 200 MB, however small the previews are.

The hash in the name is Java's hash of the content address of the media collection, so the tool on this page can tell you which kind of media a .thumbdata file covered (for example, -1967290299 is the images collection) and extract every thumbnail as a normal JPEG. Android 10 removed this format and deletes .thumbdata files from internal storage when it upgrades the media database; copies on old SD cards or backups stay until you remove them.

Unlike the single line of text you see when you open a DATABASE_UUID file, a .thumbdata file holds real images. Thumbnails are reduced copies, not your photos. If you lost the original pictures, though, extracting a .thumbdata file can be the only way to see what they were. Each preview is small, so treat them as a reference, not a replacement.

How to hide or clean up thumbnails

You can't stop Android from creating .thumbnails folders, but you can clear what's in them. Pick the option that matches what you want:

  1. Free space on an old phone or card: delete DCIM/.thumbnails (especially large .thumbdata files) with a file manager that shows hidden files. Your camera photos in DCIM/Camera are separate.
  2. Fix wrong or blank previews: delete the files inside Pictures/.thumbnails or Movies/.thumbnails. Android generates new ones as you browse.
  3. Clean an SD card before archiving it: on a computer, delete the .thumbnails folders inside Pictures, Movies and Music. They will be recreated next time the card is used in an Android phone.
  4. Keep thumbnails out of your gallery: nothing to do. Android's scanner places a .nomedia file in these folders so cached previews never appear as photos (see our .nomedia guide).

Don't delete the wrong folder. Remove only folders named exactly .thumbnails. Never delete DCIM, Pictures or Camera themselves.

Common .database_uuid problems and fixes

"How do you want to open this file?" on Windows

No program is registered to open DATABASE_UUID files because they're system files, not documents. Choose Notepad once, or use the checker. Don't tick "Always use this app" unless you open these often.

The file keeps coming back after I delete it

That's by design. MediaProvider recreates the .thumbnails folders and writes the UUID every time it checks the storage. It's harmless and takes almost no space.

Several .database_uuid files contain different UUIDs

If you open DATABASE_UUID files from several folders or devices and the IDs differ, they were written by different media databases: another phone, or the same phone after a reset or after its media data was cleared. Select them together in the checker to compare. On the next check, Android replaces any that don't match and clears that folder's thumbnails.

Thumbnails disappeared after I opened the file in an editor

The editor probably saved it with a line break or byte-order mark, which no longer matches exactly, so Android discarded that folder's thumbnails and rewrote the file. Nothing else was deleted; previews come back as you browse.

Sources and technical references

.database_uuid is an internal Android convention, not a public file format, so everything on this page was checked against the Android Open Source Project code and the relevant standards.

Frequently asked questions

What is a .database_uuid file?

It is a tiny text file that Android's media system (MediaProvider) writes into the hidden .thumbnails folders under Pictures, Movies and Music. It holds one random UUID that identifies the phone's media database, so Android can tell whether the cached thumbnails in that folder still belong to it.

How do I open a .database_uuid file?

Copy it to your computer and drop it into the free checker on this page, or open it with Notepad, TextEdit or any text editor. You will see a single 36-character UUID such as 3f2b8c1e-9a4d-4e7b-b1c2-6d5e8f9a0b7c. There is nothing else inside and nothing to install.

Can I delete the .database_uuid file?

Yes. Deleting it doesn't touch your photos, videos or music. When Android finds the file missing, it assumes its current thumbnails are fine and simply writes a new .database_uuid the next time it checks the storage. Expect it to come back; that is normal.

Is .database_uuid a virus or spyware?

No. A genuine .database_uuid is a 36-byte plain-text file containing one random ID. It can't run, holds no personal data and is created by Android itself. If a file with this name is much larger or contains anything other than a UUID, check it with the tool on this page.

Why do I see .database_uuid when I connect my phone to Windows?

Android hides files whose names start with a dot, but Windows doesn't use that rule; it hides files by a separate hidden attribute. So when you browse the phone or its SD card from File Explorer, .thumbnails folders and the .database_uuid file inside them become visible.

Why is there a .database_uuid on my SD card?

Each time Android mounts a storage volume, MediaProvider creates Pictures, Movies and Music .thumbnails folders on it and writes the database UUID there. Its source code says the file is persisted on a physical SD card to help identify stale thumbnail collections, for example when the card moves to another phone.

Can I edit the UUID in a .database_uuid file?

You can, but there is no reason to. Android compares the file's text exactly with its own database UUID. Any change, even a line break added by a text editor, counts as a mismatch: Android then deletes the cached thumbnails in that folder and writes the correct UUID back.

What are .thumbdata files in DCIM/.thumbnails?

They are the thumbnail cache used by Android 9 and earlier, named like .thumbdata4--1967290299. Each one stores many small JPEG previews in fixed 10,000-byte slots. Android 10 and later stopped using them and remove them during a media database upgrade. Leftovers are safe to delete.

Is it safe to delete the whole .thumbnails folder?

Yes. It only contains cached previews plus the .database_uuid and .nomedia marker files. Your original photos live elsewhere, in folders such as DCIM/Camera. Android recreates the folder and its thumbnails as needed, so galleries may load a little slower the first time afterwards.

Does every Android phone have a .database_uuid file?

Not every one. The file comes from the MediaProvider code in Android 11 and later; Android 10 and earlier versions don't write it. Phone makers can also modify their media software, so the exact folders can vary. Seeing it, or not seeing it, is not a sign of a problem.

Summary

  • .database_uuid is a 36-byte text file Android's MediaProvider writes in Pictures, Movies and Music .thumbnails folders (Android 11 and later).
  • It holds one random version 4 database UUID that tells Android whether cached thumbnails are still valid.
  • To open DATABASE_UUID files, use any text editor or the free checker; don't save changes.
  • It's not a virus, holds no personal data, and is safe to delete: Android recreates it.

Last updated .