Tools / File Magic Identifier
File Magic / Signature Identifier
Paste the first few bytes of a file in hex, or drop a file here, and the tool reads the first 512 bytes to identify the format from its magic number. Useful when file is not available, when an extension has been changed, or when a CTF challenge gives you a mystery blob.
Or drop a file here to read its first 512 bytes.
Files never leave your browser.
Identification result
What are magic numbers
A magic number is a short, fixed sequence of bytes at the start of a file (or at a known offset) that identifies the file format. PNG starts with 89 50 4E 47 0D 0A 1A 0A, a ZIP archive starts with 50 4B 03 04 (which spells PK for Phil Katz, the creator of PKZIP), and a Linux ELF executable starts with 7F 45 4C 46 (the bytes spell .ELF). Operating systems and tools like file, binwalk, and antivirus engines use these signatures rather than file extensions, which can lie.
For CTF forensics, the most common pattern is a file with the wrong extension. A challenge might hand you flag.txt that is actually a PNG, or a corrupted PDF that is actually a ZIP. Drop the file here to see what it really is. Office files (.docx, .xlsx, .pptx), JAR files, APK files, and EPUB files all share the ZIP signature because they are ZIP archives at heart.
Once you know the real type, your next step depends on what it is. For images, run the Image Metadata Viewer to read EXIF and PNG text chunks. For executables and unknown binaries, run the Strings Extractor to pull printable text. For dense binary data, the Hex Viewer gives you a structured view with offsets and ASCII sidebar.
If the file’s magic number does not match its extension, that is almost always a deliberate clue. Rename the file, run the appropriate parser, and check for embedded content. binwalk -e file on the command line will recursively unpack many container formats automatically.
Challenges that use this tool
- Ph4nt0m 1ntrud3rpicoCTF 2025 · Forensics · Easy
- CanYouSeepicoCTF 2024 · Forensics · Easy
- Mob psychopicoCTF 2024 · Forensics · Medium
- Secret of the PolyglotpicoCTF 2024 · Forensics · Easy
- File typespicoCTF 2022 · Forensics · Medium
- MacroHard WeakEdgepicoCTF 2021 · Forensics · Medium
- tunn3l v1s10npicoCTF 2021 · Forensics · Medium
- Weird FilepicoCTF 2021 · Forensics · Medium
- c0rruptpicoCTF 2019 · Forensics · Medium
- extensionspicoCTF 2019 · Forensics · Medium
- Corrupted filepicoMini by CMU-Africa · Forensics · Easy
- scrambled-bytespicoMini by redpwn · Forensics · Hard
Browse the full challenge library for 54 more.
Guides that use this tool
- OSINT for CTF: How to Turn Public Data Into a FlagOSINT for CTF: identify a CVE from a prose description, recover redacted text, geolocate from EXIF, read identity out of a pcap, and profile credentials.
- Document Forensics for CTF: PDFs, Office Files, and Everything strings MissesPulling flags out of PDFs and Office documents: failed redaction, hidden slides, tracked changes, VBA macros, embedded objects, and why strings finds none of it.
- Reversing Custom VMs for CTF: Find the Dispatch Loop, Write the EmulatorRecognise a hand-rolled bytecode interpreter inside a binary, recover its opcode table, write a disassembler and emulator in Python, then solve the program it runs.
- WebAssembly Reversing for CTF: Reading WAT and Recovering Flags from .wasmFind the .wasm a page loads, disassemble it to WAT with wabt, read the stack machine, pull constants out of the data section, and debug it live in DevTools.
- Windows Forensics for CTF: Event Logs, Registry Hives, BitLocker, and SMBWork Windows artifacts from Linux: parse .evtx event logs, read registry hives offline, crack and mount BitLocker volumes, enumerate SMB shares, write YARA rules.
- Patching Binaries, Cracking Crackmes, and Writing Keygens for CTFBeat a password-checking binary four ways: read the check, steal the answer from RAM, patch the branch, or write a keygen. Plus UPX unpacking and anti-debug bypass.
Tools that pair with this one
- Hex ViewerView text or raw hex bytes as a xxd-style hex dump with byte offset, hex columns, and ASCII sidebar. Highlights printable characters and null bytes.
- Strings ExtractorPull printable text from any binary, library, or image. ASCII and UTF-16 detection, configurable minimum length, flag-like highlight, no command line needed.
- Image Metadata ViewerRead EXIF, XMP, JPEG comments, and PNG tEXt / iTXt / zTXt chunks from images entirely in the browser. Highlights flag-like values.
- StegallDrop any file and Stegall runs every applicable steg technique in parallel: LSB sweeps, bit planes, spectrograms, polyglot carving, metadata, whitespace decode, and a 6-layer base/ROT/XOR/zlib cascade. Recursively unpacks results and surfaces flag matches.
Or browse all 40 CTF tools.