Free REG test files and sample generator
A Windows registry export written by regedit. Generate valid .reg sample files to test importers, installers and configuration tooling.
What is a .reg file?
REG: Windows Registry Export. A .reg file is a Windows registry export: a header line followed by key paths and typed values. Importing one changes system configuration, which is exactly why you want a disposable sample rather than a real export.
Why generate a test REG file?
- Test an installer or configuration-management step that imports registry data.
- Verify your tooling parses key paths and value types correctly.
- Rehearse a registry import against a throwaway key before touching a real one.
How a .reg file is identified
Every .reg file begins with "Windows Registry Editor Version 5.00", a text header line rather than binary magic, and regedit itself writes these files as UTF-16 LE. That is what a validator inspecting content rather than the file name looks for.
How the size lands on the exact byte
Comment lines beginning with a semicolon take the padding.
Negative testing with broken REG files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed, so the
"Windows Registry Editor Version 5.00"identifying a .reg is gone. Same length as the valid file. - Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation, and for this format's encodings, UTF-16 and BOM test files.
Sample REG content
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\SoftwareTestData] "value_0"="137"
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Inspect in a text editor. To import, use a disposable key: `reg import file.reg` (review it first).
Media type text/plain · extension .reg · category Config & DevOps
Generate a .reg file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about REG files
What identifies a .reg file?
A .reg file begins with the bytes "Windows Registry Editor Version 5.00", a text header line rather than binary magic, and regedit itself writes these files as UTF-16 LE. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.
How can a .reg file be an exact number of bytes?
Comment lines beginning with a semicolon take the padding.
Can I download several broken REG files at once?
Yes, select more than one File Condition and you get one ZIP containing a .reg per condition, each named after its condition.
Can the REG file use UTF-16 or a byte-order mark?
Yes. .reg is a text format, so it can be generated as UTF-8, UTF-8 with a byte-order mark, UTF-16 LE or UTF-16 BE. The body is shortened before re-encoding so the finished file still lands on the exact size you asked for. Note that a UTF-16 file always has an even byte count.
How do I open or verify the REG file?
Inspect in a text editor. To import, use a disposable key: reg import file.reg (review it first).
Related Config & DevOps formats
ENV · INI · TOML · Dockerfile · gitignore · CONF · Properties · Makefile