File Viewer

Open any file in your browser and see what is inside: images, audio, video and PDFs are shown, text is shown with its encoding detected, and anything else as hex. The viewer is chosen from the file’s first bytes, so a misnamed file still opens correctly.

Viewer Media & Files Updated Oct 16, 2026
How to Use
  1. Drop a file on the box, or click it to choose one. Nothing is uploaded; the file is read on your device.
  2. Look at the readouts: the type found from the first bytes, the size, the viewer chosen and a detail such as the picture size, the duration or the number of pages.
  3. For long text and hex, step through the file with the arrow buttons; each text page is 256 KiB, so even a multi-gigabyte log opens at once.
  4. If the guess is wrong, pick a viewer under Show as, for example Text for a script saved without an extension.
  5. Read Show Work to see how the type, the text encoding and the viewer were decided.
Input
Drop any file, or
Any type, any size — opened on your device, never uploaded
No file chosen yet.
Presets (sample files)
Preview
Drop a file or press a preset.
Type
—
Size
—
Viewer
—
Detail
—

Worked Example

A file whose name lies. An email attachment is called report.pdf, but its first eight bytes are 89 50 4E 47 0D 0A 1A 0A, the PNG signature, where a PDF would start with 25 50 44 46 2D (“%PDF-”). The viewer trusts the bytes: it shows the picture, names the type PNG and warns that the extension does not match. Opened as a PDF, the same file would simply fail.

A 1,000,000-byte log. Text is shown 262,144 bytes (256 KiB) at a time, so the file has ⌈1,000,000 ÷ 262,144⌉ = 4 pages; the last one runs from byte 786,432 to byte 999,999, 213,568 bytes. Only the page on screen is read, which is why the same takes no longer for a 5 GB file. Where a page boundary falls in the middle of a multi-byte character, the page stops just before it and the next page starts with it.

The common mistake: the wrong text encoding. “café” saved as UTF-8 is the bytes 63 61 66 C3 A9. Read as Windows-1252, C3 is “Ô and A9 is “©”, so the word appears as “café” (garbling known as mojibake). The viewer checks whether every byte sequence is valid UTF-8 before choosing, and only falls back to Windows-1252 when it is not; Show Work names the encoding it used.

Show Work

Open a file or press a preset to see how its type, encoding and viewer were chosen.

How the Viewer Is Chosen

1. Signature
first bytes → known format
25 50 44 46 = PDF, FF D8 FF = JPEG, 52 49 46 46 = RIFF (WAV, AVI, WebP)
2. Text or binary
no 00 bytes and < 2% control bytes
Checked on the first 64 KiB
3. Text encoding
BOM → valid UTF-8 → Windows-1252
EF BB BF = UTF-8, FF FE / FE FF = UTF-16
4. Extension
used only if the bytes say nothing
And a warning when they disagree
Text pages
pages = ⌈size ÷ 262,144⌉
Ends moved back to a whole UTF-8 character
UTF-8 character length
0xxxxxxx 1 · 110xxxxx 2 · 1110xxxx 3 · 11110xxx 4
10xxxxxx bytes only continue a character

Background: Extensions, Signatures and Sniffing

A file’s name is only a label. Windows decides which program opens a file from its extension, so a renamed file opens in the wrong program or not at all, and a dangerous one can hide behind a harmless name. The file’s own first bytes are far more reliable: most binary formats begin with a fixed signature, and programs that need to be sure, from the Unix file command to the content sniffing that web browsers apply to downloads, read those bytes rather than the name.

Text has no signature, so it is recognised by what it lacks: zero bytes and control characters, which text almost never contains. Its encoding is the second puzzle. UTF-8, now the usual encoding, has a strict structure in which every byte above 0x7F belongs to a two- to four-byte sequence of a known shape, so a file that follows those rules is almost certainly UTF-8. Older Windows text in Western European languages usually uses Windows-1252, where every byte is a character on its own.

About This Tool

This viewer opens any file and picks the right way to show it from its first bytes: the site’s image engine for more than 200 image formats, your browser’s player for audio and video, pdf.js for PDFs, a paged text view with the encoding detected, and hex for everything else. Text and hex are read a page at a time, so there is no size limit, and HTML, SVG and PDF content is displayed without running any of its scripts.

Everything stays on your device; nothing is uploaded. It suits anyone who receives a file they cannot open, needs a quick look without installing a program, or wants to check what a download really is before trusting it.

Related tools: Database Viewer, Threat Analyzer and Universal Image Converter.

Frequently Asked Questions

Which kinds of files can it show?

Images in more than 200 formats (from PNG and JPEG to TIFF, PSD, HEIC and camera RAW) through the site’s image engine; audio and video that your browser can play, such as MP3, WAV, MP4 and WebM; PDFs, drawn page by page; and any text file, including CSV, JSON, logs and source code. Everything else is shown as hex bytes, which still tells you a lot about what a file is.

Is it safe to open HTML, SVG or PDF files here?

Yes. HTML is shown as its source text and never run. SVG is drawn as an image, a mode in which browsers do not run scripts; the SVG preset contains a script that stays silent. PDFs are drawn by pdf.js onto a canvas, with no PDF JavaScript run. The file never leaves your computer.

Why does the viewer ignore the file extension?

Because names lie and first bytes rarely do. A file named report.pdf that starts with 89 50 4E 47 is a PNG picture, and one named invoice.pdf that starts with 4D 5A (“MZ”) is a Windows program. The tool reads the signature first, uses the extension only when the bytes are not recognised, and warns you when the two disagree.

Why will a video not play?

Browsers play only some codecs. An MKV or MOV file usually opens if it holds H.264 or VP9 video, but not if it holds HEVC (H.265) on a browser without HEVC support, or older codecs such as MPEG-2. The tool says when the player gives up; the Video Inspector names the codec, and the Video Converter can turn it into an MP4 that plays.

Can it open very large files?

Yes for text and hex: only the page on screen is read, 256 KiB of text or 4 KiB of hex at a time, so a 5 GB log or disk image opens instantly. Audio and video stream from the file. Images and PDFs must be decoded whole, so PDFs over 300 MiB are shown as hex instead.

How do I use the File Viewer?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Does it cost anything or need an account?

No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.

Is anything I type uploaded?

No. The tool works entirely on your device, so the values you enter never leave your browser.

Common Use Cases

A file with no extension

An attachment called “scan” turns out to start with FF D8 FF: it is a JPEG and opens as a 2480 × 3508 picture.

A huge log

A 3.2 GB server log opens on page 1 of 12,208 at once; jump to the last page to read the newest lines.

Garbled characters

A CSV that shows “café” elsewhere opens here as “café”, with the encoding (UTF-8) named in Show Work.

Checking before opening

Look inside a download called invoice.pdf before opening it: if the first bytes say 4D 5A, it is a program.

Last updated: