What is the THUMBDATA4 file format?
.thumbdata4 is a proprietary binary cache file created by Android's stock Gallery app and the MediaStore content provider to store scaled-down previews of every photo or video the gallery has indexed. Multiple JPEG thumbnails are packed back-to-back inside the file, each beginning with the standard JPEG SOI marker (FF D8 FF), preceded by an internal index region that tracks their positions. The container carries no stable magic bytes at offset 0, so tools cannot identify it by a single file signature.
Files are hidden inside the DCIM/.thumbnails folder and always carry a long signed hash appended to the name - for example .thumbdata4--1967290299 - which varies by device and Android version. A companion .nomedia file in the same folder instructs MediaStore not to display the cache folder as a photo album.
The name encodes the cache generation: .thumbdata3 and .thumbdata5 are predecessors and successors of the same family; .thumbdata5 largely replaced .thumbdata4 on Android 7 and later, while modern Google Photos stores caches differently.
The cache can grow from tens of megabytes to several gigabytes on heavily used devices. It is safe to delete - Android rebuilds it automatically the next time the gallery opens. For quick cleanup, Files by Google is the recommended tool; forensic utilities such as PhotoRec can carve individual thumbnails from the binary blob.
Security & safety
RISK: LOWThe file itself is harmless passive cache data - it cannot execute. Two real cautions: (1) Deleting it is safe and does NOT delete your photos, but some users panic and delete the wrong thing - only the .thumbdata cache in .thumbnails is expendable. (2) Privacy: because it holds previews of every photo the gallery ever indexed, the cache can contain thumbnails of pictures you already deleted; if you hand a phone or its backup to someone, wipe this file. 'Thumbnail recovery' is also a known forensic technique - the cache can reveal deleted images.
Format details
in a nutshellPrograms that open THUMBDATA4 files
Technical details
deep spec| Format type | Proprietary binary thumbnail cache - index region plus packed JPEG thumbnail blobs |
| MIME type | application/octet-stream |
| Encoding | Binary |
| Container structure | Internal index/bookkeeping region followed by JPEG thumbnails stored consecutively in the same blob |
| Magic bytes | None at offset 0; JPEG SOI markers (FF D8 FF) appear at many internal offsets within the cache blob |
| Compression | Individual thumbnails are JPEG-compressed; the cache container itself is not separately compressed |
| Thumbnail dimensions | Small preview size, commonly a few hundred pixels on the long edge - not the full-resolution original |
| Color depth | 8-bit per channel, 24-bit color (standard JPEG thumbnail output) |
| Filename pattern | Always includes a signed integer hash suffix, e.g. .thumbdata4--1967290299; value varies by device and Android version |
| Storage location | DCIM/.thumbnails/ hidden folder on Android internal storage |
| Companion file | .nomedia file placed in the same folder suppresses gallery indexing of the cache directory |
| Typical file size | Tens of MB to several GB depending on how many images the gallery has indexed |
| Entry count | One thumbnail entry per indexed image or video; no fixed upper limit |
| Associated platform | Android (stock Gallery app and MediaStore content provider) |
| Superseded by | .thumbdata5 on Android 7 and later; modern Google Photos uses a different caching mechanism |
| Deletability | Safe to delete manually; Android regenerates the cache automatically on the next gallery launch |
| Released | Android gallery thumbnail caching (stock Gallery / MediaStore); the '.thumbdata4' name seen ~Android 5/6 era |
THUMBDATA4 conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about THUMBDATA4 files.