File Formats3 min read

How to Identify an Unknown File Type Without Guessing From the Extension

A filename is only a hint. Safer identification combines the extension with the file’s actual contents and the context it came from.

An extension such as .jpg, .pdf, or .docx is useful, but it is not proof of what a file contains. Extensions can be missing, incorrect, or deliberately misleading. Identification should combine several signals rather than relying on the last few letters of the filename.

Useful identification signals

  • Filename extension.
  • MIME type reported by the browser or operating system.
  • Magic bytes or file signature at the beginning of the file.
  • Readable text patterns such as JSON, XML, CSV, or source code.
  • Container structure, for example ZIP-based DOCX or ODT packages.
  • The source and context in which the file was received.

Unknown should also mean untrusted

If the file came from an unexpected email, download, message, or removable device, do not run executables, scripts, installers, macros, or unknown binaries merely to discover what they are. Use your operating system’s security tools and an approved malware-scanning workflow.

What File Opener can reveal

Detected contentWhat Fitabyte can doLimit
ImagePreview and offer image exportDepends on browser decoder support
PDFOpen in browser viewerViewer capabilities vary
ODT/DOCXExtract readable textDoes not reproduce full document formatting
Text-like fileDisplay readable contentLarge or unusual encodings may be partial
BinaryReport that a visual/text preview is unavailableDoes not reverse-engineer proprietary formats

Use File Opener for quick, local inspection when the file is from a source you trust. If the extension is HEIC, read the dedicated HEIC guide; for AVIF, use the AVIF guide.