How to Edit REG_BINARY Values in Regedit

This article explains how raw binary data is represented and manually entered in a REG_BINARY value using the Windows Registry Editor (Regedit). It breaks down the three-column layout used to display binary information, provides step-by-step instructions for entering hexadecimal bytes, and outlines how raw data can be imported using registry script files.


How REG_BINARY Data is Represented in Regedit

When you open a REG_BINARY value in Regedit by double-clicking it, the Edit Binary Value dialog box appears. The data is presented in a three-column interface:

  1. Offset (Left Column): Displays the memory address or position of the byte sequence in hexadecimal (e.g., 0000, 0008, 0010). Each row typically represents an increment of 8 bytes.
  2. Hexadecimal Data (Center Column): Displays the raw binary content in hexadecimal pairs (bytes), ranging from 00 to FF. Each pair represents 8 bits of raw binary data.
  3. ANSI/ASCII Preview (Right Column): Displays the human-readable text representation of each byte. Printable characters (letters, numbers, symbols) appear as their corresponding text, while non-printable characters or control codes are rendered as dots (.).

How to Enter Raw Binary Data Manually

To enter or modify binary data inside the Registry Editor:

  1. Open Regedit (press Win + R, type regedit, and hit Enter).
  2. Navigate to the desired registry key.
  3. To create a new value, right-click an empty space in the right pane, select New > Binary Value, and name it.
  4. Double-click the REG_BINARY entry to open the Edit Binary Value window.
  5. Click directly into the Hexadecimal (center) area to place the cursor.
  6. Type the hexadecimal digits (09 and AF).
    • Regedit automatically groups characters into two-digit pairs (bytes).
    • As you type, the cursor advances to the next byte position.
    • The corresponding character representation updates simultaneously in the right pane.
  7. Click OK to save the changes.

Representation in .reg Files

When exported or scripted into a .reg file, REG_BINARY data is formatted as a comma-separated list of two-digit hexadecimal values prefixed by hex::

[HKEY_CURRENT_USER\ExampleKey]
"ExampleBinaryValue"=hex:01,00,00,00,ff,a2,00,1b

To span multiple lines in a .reg file, a backslash (\) is used at the end of each line as a continuation character.