EXIF Tools logo

Linux file Command Online

Run browser-side file(1) detection through libmagic WebAssembly.

Your file is not uploaded. This page runs libmagic in your browser through WebAssembly, and the file stays on your device while detection runs.
Ready.
Browse or drag and drop a file anywhere on the page. Supported browser flags are a practical libmagic subset, not full CLI parity.

file(1) Output

Results will appear here after libmagic finishes.
No file command data yet.
Raw file(1) Output
Results will appear here after libmagic finishes.

File

No file selected yet.

Why This Page Exists

The main metadata viewer on exif.tools already does signature checks and parser-based inspection, but it is not the same thing as the Unix file command. This page adds a browser-side libmagic engine for people who specifically want file(1)-style output.

To keep browser memory and responsiveness under control, the page analyzes up to the first 1 MiB of the file, which aligns with libmagic's default bytes limit closely enough for typical file-command use.

Supported Browser Flags

This page accepts a practical subset of the Linux file flags and maps them to libmagic flags in the browser.

Supported here
  -i, -I, --mime
  --mime-type
  --mime-encoding
  --extension
  -k, --keep-going
  -r, --raw
  -z, --uncompress
  -Z, --uncompress-noreport
  -e, --exclude TEST
  --exclude=TEST
  --exclude-quiet TEST

Ignored because output is already single-file/browser-local
  -b, --brief
  -d
  -n, --no-buffer
  -N, --no-pad
  -S, --no-sandbox

Not implemented here
  -m, -M, -f, -F, -P, -C, -D, symlink/device handling and other host-oriented options

Reference
  file --help
  https://man7.org/linux/man-pages/man1/file.1.html

Credits

The original file command and libmagic project are the reference point for this page. This browser tool uses the WASM wrapper package moshen/wasmagic, which compiles libmagic to WebAssembly.

This page is intended as a browser-side companion to the native command, not a claim of full CLI parity with every host-specific file option.