FlyText icon FlyText

Hex Editor for Binary Files on Windows

Sometimes text view hides what a file really contains. A hex view shows the raw bytes, offsets, and structure underneath.

Text editors are built to show characters, but every file on disk is really a sequence of bytes. When a file is not text, or when you need to see exactly what bytes are there, a hex view is the right tool. It displays the raw content as hexadecimal values alongside the decoded text where printable.

This article explains how a hex view works on Windows, what the columns mean, and the cases where inspecting bytes is genuinely useful. It also covers the safety rules you should follow before editing anything binary.

What a hex view shows

A hex editor lays the file out as rows of bytes. Each row shows an offset (the byte position from the start of the file), the byte values in hexadecimal (two characters per byte, from 00 to FF), and a text representation of those bytes where they are printable ASCII.

The offset column is your address into the file. Byte 0 is the start; if you see EF BB BF at offset 0, you have identified a UTF-8 BOM. This kind of evidence is impossible to read in a normal text view, which would either hide the BOM or show it as stray characters.

Common cases for hex inspection

You reach for a hex view when the text representation lies or is absent.

  • Encoding forensics: confirm a BOM or detect UTF-16 double-byte spacing.
  • File type checks: many formats start with a magic number, such as 50 4B 03 04 for ZIP-based files, or 89 50 4E 47 for PNG images.
  • Corruption repair: spot a run of zeroed bytes or a truncated tail that a text editor would simply fail to open.
  • Binary config: inspect values stored as raw bytes rather than text, such as length prefixes or checksums.

Caution: editing bytes directly can make a file unreadable. Back up before you change anything binary.

Reading byte values

Hexadecimal is base 16, so each byte is two digits using 0-9 and A-F. The value FF is 255 in decimal, the largest a single byte holds. Two adjacent bytes can represent a 16-bit number, and the order (little-endian versus big-endian) determines how those bytes combine, a detail that matters when interpreting lengths or checksums in a binary format.

Endianness is a frequent source of confusion. On x86 Windows, multi-byte integers are usually stored little-endian, meaning the least significant byte comes first. A length of 0x1234 is stored as 34 12. Knowing this lets you read sizes and offsets directly from the dump instead of guessing.

Hex Decimal Note
000null byte
0A10LF line ending
0D 0A13 10CRLF on Windows
FF255max single byte

These are standard byte facts, useful when interpreting a hex dump.

Editing safely

If you must change bytes, edit the smallest region possible and keep a copy. A single wrong value in a header can stop a file from opening. Prefer tools that operate on the byte level deliberately, and verify the result by reopening the file afterward.

A safe habit is to make the change, save to a new file, and compare the two with a binary diff rather than overwriting the original. That way a miscalculated byte costs you a re-edit, not the loss of the only good copy.

Text editor with a hex view

Some Windows text editors include a hex mode alongside the text view, so you can switch perspectives on the same file without a separate program. This is convenient when you move between reading logs and inspecting a binary attachment, all in one place.

The combined tool also helps when a file is mostly text with a few binary regions. You can read the readable parts as text and drop into hex only where the structure demands it, without losing your place or your scroll position.

Pair this with how to open large files on Windows and how to view large log files. See the FlyText overview for the editor's hex mode.

Try it on your own files

Download the free trial and see how it behaves on real work.

Download More articles

Common questions

What does a hex editor display?

It shows each byte as a two-digit hexadecimal value, with an offset column and a printable-text representation alongside.

What is a file offset?

The offset is the byte position from the start of the file; offset 0 is the first byte.

What is the UTF-8 BOM in hex?

The UTF-8 BOM is the three bytes EF BB BF at the start of the file.

Is it safe to edit binary files in a hex view?

Only with a backup. Changing the wrong byte, especially in a header, can make the file unusable.

When should I use a hex view instead of a text editor?

When the file is not plain text, when you need to confirm exact bytes such as a BOM or magic number, or when inspecting corruption.

Keep reading