File types
What type of file is this?
A file's extension is only part of its name, and anyone, or any app, can change it. What a file really is is written in its first bytes. hexscope reads them, in your browser, and says what the file is — and when its name says otherwise, the name that fits. The file is not uploaded anywhere.
Check a file Try a photo with the wrong name
1 Why the name and the file disagree
- A phone's photo, renamed: an iPhone takes photos in HEIC, and some apps and transfers name them .jpg without converting them.
- A download under the wrong name: a site sends a Word document as contract.pdf.
- A file renamed by hand, to get it past a form that takes only some kinds of file.
- A document that is a ZIP inside: .docx, .xlsx, .pptx, .odt, .epub and .apk files are all ZIP archives, so one renamed to another of them still looks like a ZIP.
Apps that go by the name then refuse the file, or say it is damaged. The bytes are fine; only the name is wrong.
2 Check a file
Open the file in hexscope. It reads the bytes the file begins with — its signature — and names the format from them, whatever the name says; for a ZIP, it looks inside to tell a Word document from a spreadsheet or a book. When the name says another format, the first line of the answer says so, and which name fits:
Named .jpg, but it is a HEIC image. Apps that go by the name may refuse it or call it damaged; renaming it to .heic fixes that.
Rename the file to the name it suggests. The file itself does not change, so nothing is lost.
3 What it recognises
- Pictures: JPEG, PNG, HEIC, AVIF, WebP, GIF and TIFF.
- Videos and sound: MP4, QuickTime (.mov) and M4A.
- Documents: PDF; Word, Excel and PowerPoint, old and new; LibreOffice's .odt, .ods and .odp; RTF; EPUB books.
- Email messages: saved messages (.eml) and Outlook's .msg.
- Archives and programs: ZIP, Android apps (.apk) and WebAssembly.
It also names many kinds of file it does not open — MP3, WAV, FLAC and Ogg recordings, RAR, 7-Zip and gzip archives, BMP and JPEG 2000 pictures, PostScript, SQLite databases, and Windows, Mac and Linux programs — so you know what you have, and what to open it with.
4 When the name fits and the file still will not open
Then the file may be damaged: cut short by a download, or broken in a copy. hexscope says where the damage begins and, for PNG, JPEG and ZIP files, can save what survived. More: Why won't my PNG open?
5 Many files, or in a script
Drop a folder on the page to check every file in it. On your own computer, the command line tool lists every file whose name says another format, and exits with 1 if it finds one — before the files go anywhere:
hexscope check --fail-on misnamed files/
Check a file now Your files never leave your browser.