Hex Editor

ETWriter includes a hexadecimal editor for inspecting and modifying raw file bytes. Unlike the standard text editor, Hex Editor mode works directly with byte values.

What Is Hexadecimal Editing?

A byte contains eight bits and can be represented using two hexadecimal digits.

For example:

DecimalHexadecimalASCII
6541A
6642B
6743C
3220Space
100ALine feed
000NUL
255FFNot standard printable ASCII

Hexadecimal editing is useful when ordinary text editing cannot accurately represent a file's underlying structure.

Opening the Hex Editor

  1. Select Hex Editor from the mode selector.
  2. Click Open.
  3. Choose a file.
  4. Review its hexadecimal content.
  5. Make the necessary byte changes.
  6. Enter an output filename.
  7. Click Save.

Understanding the Interface

Hex Editor mode displays two areas:

AreaPurpose
Hex EditorDisplays editable hexadecimal byte values
Preview (ASCII)Displays a text representation of the parsed bytes

The interface also maintains a byte count.

Hexadecimal Representation

Consider the text:

Hello

Its ASCII-compatible UTF-8 bytes are:

48 65 6C 6C 6F

Each pair represents one byte.

Hex ByteCharacter
48H
65e
6Cl
6Cl
6Fo

Editing Bytes

To change the content:

  1. Locate the hexadecimal byte to modify.
  2. Replace the two hexadecimal digits.
  3. Review the ASCII preview.
  4. Save the resulting byte sequence.

Example

Original bytes:

43 61 74

ASCII preview:

Cat

Modified bytes:

42 61 74

ASCII preview:

Bat

Changing 43 to 42 changes the first byte from uppercase C to uppercase B.

Separators and Whitespace

ETWriter accepts hexadecimal byte pairs separated by spaces or line breaks.

For example:

48 65 6C
6C 6F

The implementation extracts matching two-character hexadecimal sequences.

Characters that are not part of a recognized hexadecimal pair are not written as bytes.

Caution: The parser is permissive. It does not enforce a strict hexadecimal document format. Always inspect the parsed byte count and resulting output before saving.

Colorized Hex Display

When CodeMirror is available, ETWriter applies a custom hexadecimal display mode.

Each byte value receives an assigned color from a palette spanning all 256 possible byte values.

This makes changes and repeated byte values easier to distinguish visually.

Special Values

Two byte values receive additional visual emphasis:

ByteSpecial Styling
00Dotted underline
FFDotted underline

The colors are visual aids. They do not indicate whether a byte is valid or invalid.

ASCII Preview

The ASCII preview updates as the hexadecimal content changes.

Printable ASCII bytes from decimal 32 through 126 are displayed as characters.

Other byte values appear as periods (.).

Example

Hex:

41 42 00 43 0A

Preview:

AB.C.

The NUL byte and line-feed byte appear as periods because they are outside the printable ASCII range.

Byte Count

ETWriter calculates the number of bytes obtained from the current hexadecimal input.

For example:

DE AD BE EF

contains four bytes.

The byte count represents the parsed binary output, not the number of visible characters typed into the editor.

Saving Binary Output

ETWriter converts the hexadecimal pairs into a byte array.

The resulting bytes are saved directly to the selected output file.

This makes Hex Editor mode suitable for modifying arbitrary binary data.

Important Precautions

Editing binary files can corrupt their internal structures.

Small changes may affect:

  • File headers
  • Encoded values
  • Checksums
  • Offsets
  • Compressed data
  • File-format structures

ETWriter does not automatically recalculate file checksums, update embedded references, or validate binary formats.

Recommended Workflow

  1. Keep an untouched copy of the original file.
  2. Inspect the intended byte positions.
  3. Make limited changes.
  4. Save to a new output filename.
  5. Verify the output using an appropriate application or validator.

Warning: The Hex Editor is a byte-editing tool, not a format-aware binary repair utility.


Did this page help you?