Guides › Desktop and apps

Hex Editor

Look at and change the bytes of any file, search for bytes or text, and look inside a whole drive without changing it.

Hex Editor shows the bytes a file is made of. Every byte is shown as a two-digit hexadecimal number (hex for short: the digits 0 to 9 and the letters A to F, so one byte is 00 to FF) and as a text character. It is useful for checking a file's type, fixing a damaged file or seeing what a program wrote.

Hex Editor reads only the part of the file you are looking at, so even very large files open at once.

Warning Changing bytes in a file can break it. Keep a copy of any file you edit, and save only when you are sure.

Open a file

  1. Open Start, type hex and click Hex Editor.
  2. Click Open or press Ctrl + O.
  3. A box appears in the toolbar with your Documents folder in it. Type the full path of the file, for example C:\Accounts\you\Documents\photo.jpg, then press Enter.
  4. The file opens. The title bar shows its name.

If the file can only be read (for example a file on a drive that your organization made read only), the toolbar shows a red Read-only badge and you can look but not change anything.

Read the three columns

Each row shows 16 bytes:

  • Offset on the left: where the row starts in the file, counted in hex from 0.
  • Hex in the middle: the 16 bytes as hex numbers, with a small gap after the eighth.
  • Text on the right: the same bytes as characters. Bytes that are not plain letters, digits or punctuation show as a dot.

Bytes you have changed but not saved show in a different colour. Bytes that could not be read show as ??.

Move around

KeysWhat happens
Arrow keysMove one byte, or one row up or down
Page Up, Page DownMove one screen
Home, EndStart or end of the row
Ctrl + Home, Ctrl + EndStart or end of the file
TabSwitch between the hex column and the text column
Shift with any of theseSelect bytes as you move

You can also click a byte, drag across bytes to select them, use the mouse wheel, or drag the scroll bar.

Go to an offset

  1. Click Go to or press Ctrl + G.
  2. Type an offset and press Enter. Use 0x1F00 or 1F00 for hex, or 7936 for a decimal number. A number that has any of the letters A to F in it is read as hex.

Change bytes

Hex Editor always overwrites: it never inserts or removes bytes, so the file keeps its size.

  • In the hex column, type two hex digits. The first digit changes the first half of the byte, the second digit finishes it and moves to the next byte.
  • In the text column, type a character. Its byte replaces the one under the cursor.
  • Press Ctrl + Z, or click Undo, to undo the last change. You can undo many changes, back to when you opened or last saved the file.

Save your changes

  1. Click Save or press Ctrl + S.
  2. Hex Editor writes only the bytes you changed, straight into the file. The file keeps its size, its name, its permissions and its other names (links), and saving a large file is quick. Before it writes anything, Hex Editor opens the file for writing: if that is not allowed, nothing is changed.
  3. The status line at the bottom says Saved and the name of the file.

If you close the window with changes that are not saved, Hex Editor asks Save changes? Click Save, Don't save or Cancel.

After a save, undo starts over from the saved file.

Find bytes or text

  1. Click Find or press Ctrl + F.
  2. A button next to the box shows Hex or Text. Click it to choose what you are looking for.
  3. Type what to find and press Enter. In Hex mode, type bytes such as 4D 5A or 4d5a90. In Text mode, type text such as PNG; upper and lower case letters match each other.
  4. The first match after the cursor is selected. If nothing is found before the end, the search goes on from the start of the file.
  5. Press Enter again, or F3, for the next match.

On a large file the status line shows how far the search has got. Press Esc to stop it.

Copy bytes

  1. Select the bytes you want.
  2. Click Copy hex to copy them as hex numbers like 4D 5A 90 00, or Copy text to copy them as characters.
  3. Ctrl + C copies in the form of the column you are in.

The clipboard holds up to 4 KB of text, so a large selection is cut short. The status line says how many bytes were copied.

Read numbers with the data inspector

The Data inspector on the right shows what the bytes at the cursor (or at the start of the selection) mean as numbers:

  • whole numbers of 1, 2, 4 and 8 bytes (int8 to int64), with and without a sign (uint8 to uint64)
  • float (4 bytes) and double (8 bytes) decimal numbers
  • the eight bits of the first byte

Each value is shown twice: Little endian (lowest byte first, as most PCs store numbers) and Big endian (highest byte first, as many file formats and networks do).

Look inside a whole drive

Hex Editor can show the bytes of a whole drive or one of its partitions (the parts a drive is divided into). This is only ever read: nothing on the drive can be changed from Hex Editor.

  1. Click Open drive or press Ctrl + Shift + O.
  2. Because a drive holds everyone's files, you are asked for an administrator's permission.
  3. The list shows every drive and partition with its name, label and size. Choose one with the arrow keys or the mouse, then click Open or press Enter.
  4. The bytes of the drive appear, with the red Read-only badge in the toolbar.

You can move around, go to an offset, search, copy and use the data inspector as with a file. Typing does not change anything.

If something goes wrong

  • "No file was found at that path": type the whole path, starting with the drive letter, such as C:\.
  • "Could not save. The file was not changed.": the drive may be read only, or the file may be protected. Nothing was written.
  • "Could not save every change": something went wrong part way, for example the drive was unplugged. Some of your changes are in the file and the rest are not. Your changes are still shown in Hex Editor: save again to write them all.
  • "The file was replaced since it was opened" or "The file changed size since it was opened": another app changed the file. Nothing was written. Open the file again and make your changes again.
  • "Too many changes: save them first": Hex Editor keeps up to about a million changed bytes before a save. Save, then go on.
  • The Open drive list asks for a password I don't have: only an administrator of this computer can look at whole drives.

Still stuck? Search the help center or contact support.