GIF File Signature & Magic Bytes (.gif)
Graphics Interchange Format (GIF) stores indexed-colour images (up to 256 colours per frame) compressed with LZW. Every GIF begins at offset 0 with the 6-byte ASCII version header GIF87a (1987) or GIF89a (1989, which added frame delays, transparency and application extensions).
Signature & identification summary
| Detected format name | GIF image |
|---|---|
| Hexadecimal magic bytes | 47 49 46 38 37 61 / 47 49 46 38 39 61 |
| ASCII / marker preview | GIF87a / GIF89a |
| Byte offset | 0 |
| MIME type | image/gif |
| Common extensions & aliases | .gif |
Check whether your file really is GIF.
Drop any file into File Sniff’s free local browser checker to verify its 47 49 46 38 37 61 / 47 49 46 38 39 61 signature and spot misleading extensions—without uploading a single byte.
Container & byte-layout notes
After the 6-byte signature sits the Logical Screen Descriptor, optional Global Colour Table, Graphic Control Extension blocks (frame timing and transparent colour index), Image Descriptors, LZW data sub-blocks, and the terminating trailer byte 0x3B.
Extension mismatches & common pitfalls
Many modern “GIFs” shared on Discord, Tenor, Imgur or Reddit are actually silent MP4 or WebP animations saved with a .gif extension—checking magic bytes tells them apart immediately.
Which apps open GIF files?
| Platform | Compatible applications & tools |
|---|---|
| Mac (macOS) | Safari, Preview (shows individual frames), Quick Look (Spacebar animates) |
| iPhone & iPad | Photos, Messages, Safari, Files Quick Look |
| Windows | Photos, Edge/Chrome/Firefox, Paint (first frame) |
Free local tools & related guides
- Check whether a file really is GIF
- Inspect raw bytes in the Hex Viewer
- Guide: File Signatures & Magic Bytes Guide
- Guide: What does a file extension mismatch mean?
Inspect files & folders natively
on Mac, iPhone & iPad.
The native File Sniff app scans entire folders, spots extension mismatches, repairs extensions with Undo on Mac, and exports CSV or JSON reports locally.