What is a .reg file?
Windows Registry File · Code and data · Microsoft · 1990s
A REG file is a text file that adds or changes Windows Registry settings when you merge it. It is powerful and Windows-only, so read one before you run it and only merge REG files you trust.
What is a .reg file used for?
A REG file is an export or a script of registry keys and values in a readable text format. Double-clicking it merges those entries into the Windows Registry, which is the central settings database Windows and its programs rely on.
People use REG files to apply a tweak, back up a section of the registry, or restore settings after a reinstall. The same power makes them a favourite of malware, which is why an unexpected .reg deserves suspicion.
The safe way to inspect one is to right-click and choose Edit, which opens it as text in Notepad without changing anything. Only after reading it, and ideally backing up the registry, should you merge it.
REG files only mean something on Windows. On other systems you can read the text, but there is no registry to apply it to.
How to open a .reg file
The .reg format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- Right-click, Edit (view as text, safe)
- double-click to merge (caution)
- Notepad
macOS
- Text editor (to read only)
Linux
- Text editor (to read only)
Web
- Any online text viewer (to read only)
How to convert a .reg file
You can convert a .reg file to Not convertible using a conversion tool or the export menu of an app that opens it.
.reg file signature (magic bytes)
Programs recognise a .reg file by the bytes at the start of the file, not by its name. These are the signatures for REG.
| Hex signature | Offset | Note |
|---|---|---|
| 52 45 47 45 44 49 54 34 | 0 | 'REGEDIT4' (ANSI); version 5 files are UTF-16 text starting 'Windows Registry Editor Version 5.00' |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .reg file?
A REG file is a text file that adds or changes Windows Registry settings when you merge it. It is powerful and Windows-only, so read one before you run it and only merge REG files you trust.
How do I open a REG file without changing my registry?
Right-click the file and choose Edit (or open it in Notepad). That shows the contents as text so you can read exactly what it would change, without applying anything. Double-clicking, by contrast, merges it into the registry.
Is it safe to run a REG file?
Only if you trust it. Merging a REG file edits the Windows Registry, which can change how Windows behaves or, in the wrong hands, cause harm. Read it first and back up the registry before merging one you did not create.
Related formats
Sources
Details on this page were checked against authoritative references: