How to Format REG_MULTI_SZ Values in Regedit

This article explains the formatting rules for entering multiple text strings into a REG_MULTI_SZ registry value using the Windows Registry Editor (Regedit). In the graphical user interface, strings are separated by standard line breaks, while the underlying registry architecture stores them as a sequence of null-terminated strings ending with an additional terminating null character.

The Line Break Rule in Regedit UI

When modifying a REG_MULTI_SZ (Multi-String Value) entry inside Regedit:

  1. Double-click the REG_MULTI_SZ value to open the Edit Multi-String dialog box.
  2. Enter each separate string on its own individual line.
  3. Press Enter after each entry to create the delimiter.
  4. Click OK to save the changes.

You do not need to manually type quotation marks, commas, semicolons, or null characters into the graphical dialog box. The text editor treats every press of the Enter key as the boundary between distinct string values.

Underlying Binary Structure

Under the hood, Windows stores REG_MULTI_SZ data as an array of null-terminated strings:

Formatting in .REG Files

If you export or manually create a .reg file containing a REG_MULTI_SZ entry, it is formatted in hexadecimal representation under the hex(7): type prefix.

Each character is written in UTF-16LE hex pairs, separated by commas: * Letters are represented by their two-byte hex code (e.g., 41,00 for “A”). * String boundaries are represented by a null byte: 00,00. * The end of the entire multi-string value is closed with an additional double null byte: 00,00,00,00.

Formatting via Command Line (REG.EXE)

When adding or modifying a REG_MULTI_SZ value using the Command Prompt (reg.exe add), use the /s parameter to define a custom separator, or separate values using \0:

reg add "HKCU\Software\Example" /v "MyMultiString" /t REG_MULTI_SZ /d "FirstValue\0SecondValue\0ThirdValue" /f

Using standard line breaks in the graphical interface or explicitly using null-terminators via scripts ensures that Windows applications read the multi-string array correctly.