.reg file value decoder
Paste lines of a .reg file to read each value as text and numbers: dword: numbers, hex(2) text with its %variables%, hex(7) lists, hex(b) 64-bit numbers and the rest. Or write a value, and get the .reg file and the reg add command for it.
Read a .reg file
| Name | Type | Value |
|---|
Write a value
The .reg file
The same with reg add, at the command prompt
To apply the file: reg import contoso.reg, or import it in Registry Editor (regedit.exe). reg import and reg add take /reg:64 or /reg:32 to pick the 64-bit or the 32-bit view of the registry.
The data in a .reg file
| In the file | Type | Number | Holds |
|---|---|---|---|
"text" | REG_SZ | 1 | Text, in quotation marks. |
dword:0000001f | REG_DWORD | 4 | A 32-bit number, as eight hex digits. |
hex:01,02 | REG_BINARY | 3 | Bytes. |
hex(0): | REG_NONE | 0 | No defined type: bytes. |
hex(1): | REG_SZ | 1 | Text again, written as bytes. |
hex(2): | REG_EXPAND_SZ | 2 | Text whose %variables% are expanded when a program reads it. |
hex(4): | REG_DWORD | 4 | A 32-bit number as four bytes, low byte first. |
hex(5): | REG_DWORD_BIG_ENDIAN | 5 | A 32-bit number as four bytes, high byte first. |
hex(6): | REG_LINK | 6 | The target path of a registry symbolic link: Unicode text. |
hex(7): | REG_MULTI_SZ | 7 | A list of strings, each ended by a null, the list by one more. |
hex(8): | REG_RESOURCE_LIST | 8 | A resource list: bytes. |
hex(9): | REG_FULL_RESOURCE_DESCRIPTOR | 9 | A full resource descriptor: bytes. |
hex(a): | REG_RESOURCE_REQUIREMENTS_LIST | 10 | A resource requirements list: bytes. |
hex(b): | REG_QWORD | 11 | A 64-bit number as eight bytes, low byte first. |
- | - | - | After the =, deletes the value. |
The number is the type's value in winnt.h; hex(N): takes it in hex, so hex(b): is type 11.
How regedit reads the file
- The first line is the header:
Windows Registry Editor Version 5.00, orREGEDIT4for the older ANSI form. With any other first line, nothing is imported. - A Version 5.00 file is Unicode: regedit saves it as UTF-16 LE with a byte order mark (FF FE), and
hex(2)andhex(7)text in it takes two bytes a character, ending with00,00. In a REGEDIT4 file that text is in the computer's ANSI code page, a byte a character. The page's Save button writes the same bytes as regedit. - A key is its full path in brackets, starting with one of
HKEY_LOCAL_MACHINE,HKEY_USERS,HKEY_CLASSES_ROOT,HKEY_CURRENT_CONFIG,HKEY_CURRENT_USER,HKEY_DYN_DATA. A minus after the opening bracket, as in[-HKEY_CURRENT_USER\Software\Contoso], deletes the key and everything under it. - A value is its name in quotation marks, or
@for the key's default value, then=and the data. In a name or a quoted string,\\is a backslash and\"a quotation mark.=-deletes the value. - Hex data is bytes of two hex digits separated by commas; a line that ends in a backslash goes on in the next line. Regedit starts a new line before 80 characters.
- A line that does not start with
[,@or a quotation mark is skipped, so a line starting with;is a comment. Microsoft's article on .reg files asks for a blank line at the end.
Sources
- How the file is read and written: Wine's regedit, an open re-implementation of Windows' Registry Editor: programs/
regedit/ regproc.c and main.c, and the type numbers in include/ winnt.h (wine at commit ff2631c), under the GNU Lesser General Public License 2.1. - The types: Microsoft's Registry value types (win32 at commit bc82a65);
reg addandreg import: Microsoft's references (windowsserverdocs at commit b640f2c); both used under the Creative Commons Attribution 4.0 International licence (creativecommons.org/licenses/ by/ 4.0/). The .reg names of the types: Microsoft's MSDN sidebar of registration file entries (last updated 30 Jun 2006, read with a page fetch on 24 Nov 2026) and its article KB 310516 on .reg files (as a web search returned its text on 24 Nov 2026).
More Windows tools
-
Windows error code lookup
Look up 0x80070005, 0xC000006D, 1603 or any other system error, HRESULT, NTSTATUS or bug check code.
-
Robocopy command builder
Build a robocopy command line, paste one to see what each switch does, and decode its exit codes.
-
Msiexec silent install builder
Build install, uninstall and repair commands and look up MSI exit codes.
-
PowerShell EncodedCommand decoder
Read the script inside an encoded PowerShell command, layer by layer, or encode one.
-
Certificate decoder
Read a certificate, a chain or a request: names, dates, thumbprint, template and account SID.
-
Access mask decoder
Read an access mask such as 0x1200A9 or -1610612736 as file, registry or Active Directory rights.
-
icacls explainer and command builder
Read icacls output such as (OI)(CI)(RX) in plain words, or build commands to grant, deny and remove rights.
-
KMS client keys and slmgr commands
Get the KMS client setup key (GVLK) of a Windows or Windows Server edition and the slmgr commands to activate it.
-
File hash checker
Work out the SHA-256, SHA-1, SHA-512 or MD5 hash of a file in your browser and compare it with the publisher's.
-
File type from its first bytes
What a file is by its first bytes, not its name: PDF, ZIP, Office, EXE or DLL with its CPU and bitness.
-
Zone.Identifier reader
The Mark of the Web on a downloaded file: its zone and address, and the commands that show and remove it.
-
Windows and IANA time zone names
Eastern Standard Time to America/New_York or America/Toronto and back, with tzutil, PowerShell and timedatectl.