Free INI sample files

Simple key = value settings grouped into sections. Old, informal and still everywhere. Download valid INI test files in 4 exact sizes, from 1 KB to 1 MB, each with a checksum.

Extension
.ini
MIME type
text/plain
Kind
Text
Category
Configuration

INI files by size

Every file below is a valid INI configuration file file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.

INI sample files by size
FileSizeContentsDownload
1 KB INI samplesample-ini-1kb.ini 1 KB1,024 bytes Sections: 9 Download INI
10 KB INI samplesample-ini-10kb.ini 10 KB10,240 bytes Sections: 90 Download INI
100 KB INI samplesample-ini-100kb.ini 100 KB102,400 bytes Sections: 888 Download INI
1 MB INI samplesample-ini-1mb.ini 1 MB1,048,576 bytes Sections: 8,933 Download INI

What is an INI file?

An INI file holds settings as key and value pairs, grouped under section names in square brackets. It originated in early versions of Windows and survives in php.ini, .gitconfig, systemd units and desktop entries.

There is no formal specification. Implementations disagree on comment characters, quoting, duplicate keys and whether values have types.

How to recognise an INI file

No signature bytes. INI files are identified by parsing their content.

Extension.ini
MIME typetext/plain
SpecificationNone; behaviour is defined by each parser
Comments; or #
TypesEverything is a string
NestingOne level of sections

What to test for

These are the behaviours that most often go wrong when software handles INI files.

Strengths of INI

  • About as simple as a configuration format can be.
  • Readable and editable by anyone with a text editor.

Limitations of INI

  • No standard, so parsers disagree on comments, quoting and duplicates.
  • No nesting, lists or data types.

Typical uses of INI test files

  • Testing configuration readers
  • Checking migration to YAML or TOML
  • Testing settings import in desktop software

Software that opens INI

  • PHP, Git, MySQL and systemd
  • configparser (Python), ini (Node.js)
  • Windows applications

Related

INI sample files: questions

Which comment style do the samples use?
Semicolons, which the widest range of parsers accept.
What is the MIME type of an INI file?
The MIME type is text/plain. The file extension is .ini.
Is a sample INI file the same as a dummy or example INI file?
Yes. Sample, test, dummy and example INI files are different names for the same thing: an INI file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy INI file.