Free INI test files and sample generator

Classic key=value settings grouped under [sections]. Generate valid .ini sample files for testing config parsers, installers and app settings.

Generate a .ini file →

What is a .ini file?

INI: Configuration File. The INI file is the oldest and simplest configuration format: sections in square brackets, then key=value lines. Windows applications and countless libraries still read it, and parsers vary in how they treat comments, duplicates and quoting.

Why generate a test INI file?

How a .ini file is identified

A .ini file has no signature at the start. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.

How the size lands on the exact byte

The format allows comments, so the padding is comment lines, legal, inert, and visible if you open the file.

Negative testing with broken INI files

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 INI content

[settings]
key_0 = 137
key_1 = 274

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

Any text editor; parse with Python's `configparser` or your language's INI library.

Media type text/plain · extension .ini · category Config & DevOps

Generate a .ini file → · questions about sizes, privacy or cost are answered on the site FAQ.

Frequently asked questions about INI files

What identifies a .ini file?

Nothing at the start of the file does. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.

How can a .ini file be an exact number of bytes?

The format allows comments, so the padding is comment lines, legal, inert, and visible if you open the file.

Can I download several broken INI files at once?

Yes, select more than one File Condition and you get one ZIP containing a .ini per condition, each named after its condition.

Can the INI file use UTF-16 or a byte-order mark?

Yes. .ini 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 INI file?

Any text editor; parse with Python's configparser or your language's INI library.

Related Config & DevOps formats

ENV · TOML · Dockerfile · gitignore · CONF · Properties · Makefile · EditorConfig

Browse all file formats →