(available in EditPad Pro only)

Click on the Hexadecimal item in the View menu or press Ctrl+H to switch between text and hexadecimal editing. The undo and redo lists are cleared whenever you switch.

In hexadecimal mode, the editing area is split into three zones. The left zone is a column with byte offsets. It indicates the offset relative to the start of the file of the first byte on each row in the hex editor. The first file in the byte has offset zero.

The middle area shows all the bytes in the file represented as a hexadecimal number. You can type in the numbers 0 through 9 and the letters A through F to insert bytes. To change some bytes without changing the length of the file, press the Insert key on the keyboard to toggle between Insert and Overwrite mode. In Overwrite mode, the bytes you type in will replace the bytes already present in the file.

The right-hand column shows the textual representation of each byte. It translates bytes into characters using the file type’s default text encoding or the non-Unicode encoding if either of those is a single byte encoding. Otherwise, it uses the encoding you selected for the ASCII section in the Editor Preferences. You can select a different 8-bit encoding for the active file using Convert|Text Encoding. You can type characters into the text column. EditPad Pro uses the same encoding to translate the characters into bytes.

If you want to see only the hexadecimal representation or only the textual representation, select Hexadecimal Only or ASCII only in the submenu of the Hexadecimal item in the View menu. Select Hexadecimal and ASCII to restore the default. Whichever mode you last selected in the submenu is used as the default next time you click the View|Hexadecimal item directly.

If you have used View|Split Editor to split the editor in two, then you can select Split Hexadecimal and ASCII in the View|Hexadecimal submenu to have the first half of the editor show only the hexadecimal representation, and the second half of the editor only the ASCII representation. If you didn’t split the editor, then the editor shows both the hexadecimal and ASCII representations.

By default, the hexadecimal view groups bytes in blocks of 8 bytes and shows as many blocks of 8 bytes on one row as will fit within the width of EditPad’s window. If your binary files use a specific record size, it may be more convenient to display one record on one row, even if that requires horizontal scrolling or leaves blank space. Use Options|Record Size to specify the number of bytes EditPad Pro should display per row in hexadecimal mode.

If your binary files store integer or floating point numbers that are larger than one byte, you can easily edit those numbers in decimal representation using EditPad Pro’s Byte Value Editor while you’re in hexadecimal mode.

Working With Text Inside Binary Files

If your binary files store text using an 8-bit encoding, you can work with that directly in the right-hand ASCII section of the hex editor. First use Convert|Text Encoding to select the proper encoding if it is not the file type’s default. In hexadecimal mode, Convert|Text Encoding never changes the bytes that are already in your file. It only changes how the ASCII section displays those bytes and how characters you type into the ASCII section are translated into bytes.

If you copy and paste between different files in hexadecimal mode in EditPad Pro then you will always paste the exact bytes that you copied, regardless of whether you are using the same or different encodings for the ASCII section of those files. If you copy from a file in text mode and paste into another file in hexadecimal mode, then the text you copied is first converted from the text file’s encoding to the 8-bit encoding you’re using for the hexadecimal file. The resulting bytes are then pasted.

If you need to work with text inside a binary file that is stored as Unicode or using a multi-byte code page, then use File|New to open an additional tab to use as a scratch space. To interpret bytes in the binary file as text, copy them from the binary file. Switch the scratch file to hexadecimal mode and then paste. You’ll paste the exact bytes. Now switch the scratch file to text mode. Use Convert|Text Encoding with the “interpret” option and the encoding you want to interpret the bytes with. This does not change the bytes in the scratch file. It only makes EditPad display them using the selected encoding. To insert new text into the binary file, switch the scratch file to text mode, set its encoding if needed, and enter your text. Then switch the scratch file to hex mode. This gives you the bytes that represent your text in the encoding that you were using in text mode. It doesn’t matter if the ASCII section shows garbage. It may be interpreting those same bytes with a different 8-bit encoding. Simply copy and paste the bytes into your actual file.

If you are using Unicode for your scratch file (or any file) and its file type specifies that a byte order marker should be written, then the BOM is added at the start of the file in hexadecimal mode. If you don’t want the BOM then you may want to use a file type that doesn’t write one for your scratch file.

In hexadecimal mode, the Search and Replace boxes work exactly the same as the main editor. They use the same encoding for their ASCII sections. So you can search for text using the same 8-bit encoding inside binary files by entering it into the ASCII section of the Search box. You can search for text using other encodings by first preparing it in a scratch file as explained above and then pasting into the Search box.

See Also

View menu
View|Byte Value Editor
Options|Record Size
Convert|Text Encoding