What Is the REG_SZ Data Type in Regedit?

In the Windows Registry Editor (Regedit), the data type that corresponds to a standard null-terminated text string is REG_SZ. This fundamental registry type stores human-readable character data, such as program paths, software names, and text configuration values. This article explains the technical definition of REG_SZ, its purpose within Windows, and how it compares to other registry string formats.

What Does REG_SZ Stand For?

The name REG_SZ breaks down into two components: * REG: Identifies it as a standard Windows Registry data type. * SZ: Stands for “String, Zero-terminated” (also referred to as a null-terminated string).

In computer programming, a null-terminated string is a sequence of characters stored in memory followed by a special NULL character (byte value 0x00). This null byte signals the end of the text string to the operating system and applications reading the registry value.

Characteristics and Usage of REG_SZ

REG_SZ vs. Other Registry String Types

Windows provides specialized string data types alongside REG_SZ for more complex operations:

Creating and Editing REG_SZ in Regedit

To work with standard text strings directly in the Windows Registry Editor:

  1. Open Regedit by pressing Win + R, typing regedit, and pressing Enter.
  2. Navigate to the desired registry key.
  3. Right-click an empty area in the right pane, select New, and choose String Value.
  4. Name the new value, then double-click it to enter your text data into the Value data field.