The quick answer
Paste an INI file, php.ini, my.ini, a game or desktop app's settings, and every key pads to a 24-character column so the equals signs align, each [section] gets a blank line on both sides, and ; or # comments survive verbatim: tempdir=/tmp becomes tempdir padded to 24 characters then = /tmp. Runs locally; configs with credentials never upload.
What a tidy .ini file looks like
Paste a settings file and the aligned version appears live, with a chars in → out readout beside it. The house style it applies is the one old config files wore best: every key padded to the same 24-character column so the equals signs stack vertically, every [section] header set off by blank lines, and every ; or # comment kept exactly as written. There is no calculate button; the output re-renders on each keystroke, and closing the tab erases both sides.
Formatting an INI file, step by step
Once you see the flow, the INI File Formatter takes seconds every time after that. The steps below cover the standard path; the tool itself is above this section, so you can follow along live.
Paste or type your INI
Paste php.ini, my.ini or any settings file into the input panel, which arrives pre-loaded with a small [database] example so you can see the alignment before pasting your own. The output re-renders on every keystroke.
Check the size stat
The output panel reports chars in → out beside the result, so the cost of the alignment padding is visible at a glance. Alignment usually grows the file: the built-in example goes from 44 to 111 characters.
Read the output panel
The formatted file sits in the output box beside the input, with sections spaced, keys aligned and comments intact. Lines without an equals sign pass through unchanged, so stray text never disappears.
Copy the result
The copy button puts the formatted file on your clipboard, ready to paste back into php.ini, a config management repo, or the ticket that asked for it.
Verify with the worked example
The methodology section below shows exactly what the tool computes, with a real worked example, the fastest way to confirm your understanding matches the tool's behavior.
That is the entire workflow. Because the output is visible on every keystroke and the formatter documents its own rules below, you never have to trust a black box; you can check the working at any point.
The alignment rules, line by line
The formatter walks the file line by line and applies four rules. A line that is exactly [section] is emitted with a blank line before and after it. A comment line, starting with ; or #, or an empty line passes through untouched. A line containing an equals sign is split into key and value, the key is padded to 24 characters, and the pair is rejoined as key = value. Anything else stays as it is; finally, runs of blank lines collapse to a single blank line.
Two consequences of those rules are worth naming. First, values are never rewritten: quotes, trailing spaces inside the value and number formats survive exactly, because the formatter aligns text rather than parsing it. Second, the file is re-serialized from the same characters, so nothing semantic can change between input and output: no key is reordered, renamed or dropped.
A worked config, before and after
The example below is a small but representative settings file: a [paths] block with two directories, a stray comment, and a [logging] block. The before side is exactly what years of hand edits leave behind; the after side is the same file with the equals signs in one column and the sections given room to breathe.
The before and after carry the same characters in the same order, only spacing and padding differ, which is the whole contract: keys such as tempdir (7 characters) gain the padding that puts their equals sign in the same column as cache and level, and the comment line survives untouched between the sections.
Input
[paths] tempdir=/tmp cache=/var/cache/app ; verbosity for the app logger [logging] level=debug
Output
[paths] tempdir = /tmp cache = /var/cache/app ; verbosity for the app logger [logging] level = debug
Who still tends INI files (and why)
INI predates YAML and TOML by decades, and an enormous amount of software still ships with it. The people pasting it here are maintaining something that already exists, not choosing a format for something new.
PHP administrators: php.ini is the canonical INI file, hundreds of keys across [PHP], [mail function] and extension sections, edited by hand, by hardening scripts and by deploy tooling until the alignment is chaos. Formatting it before a change makes the actual edit, one line, visible in the diff instead of buried in whitespace.
DBAs and SREs: MySQL's my.ini / my.cnf and a long tail of agent, proxy and legacy service configs are INI. When a parameter review lands on a file that three people and one migration script have touched, one paste puts innodb_buffer_pool_size and its neighbors in one column so nothing is skipped by the eye.
Desktop support techs: legacy applications keep per-machine INI settings in ProgramData and AppData, and a support ticket usually means comparing a broken file against a known-good one. Aligning both files first makes the one differing key jump out instead of hiding in ragged whitespace.
What the page promises
The table summarizes what the ini formatter promises and how it behaves, the same commitments every tool on this site keeps.
| Aspect | This tool |
|---|---|
| Processing | 100% client-side (JavaScript in your browser) |
| Signup required | No: no account, no email, no cookies for consent-free use |
| Data uploaded | Never: inputs stay on your device by architecture |
| Speed | Instant, live recomputation on every keystroke |
| Mobile support | Full: responsive layout, touch-friendly controls |
| Offline use | Works after first load; nothing in the formatter needs a network |
| Cost | Free, funded by clearly-labelled advertising away from controls |
| Documentation | Full methodology, worked examples and FAQ on this page |
What the INI File Formatter cannot do
The limits belong in the open; finding them the hard way is the alternative. This section covers where the INI File Formatter is exact, where it estimates, and the edge cases worth double-checking.
- Duplicate keys are not merged or flagged. INI readers disagree about which occurrence wins (first, last, or section-scoped), so the formatter aligns both and leaves the semantics to the application that reads the file.
- Keys longer than 24 characters are never truncated. Padding only adds spaces, so an extra-long key pushes its own equals sign past the column, and the line still parses.
- Case is untouched. INI key and section case-sensitivity varies by reader (Windows APIs often fold case), so the formatter never normalizes spelling.
Every limit shares one theme: the formatter fixes layout with exact, deterministic rules and stays silent about semantics, because semantics in INI belong to whichever program reads the file.
Privacy: where your data goes (nowhere)
The inputs people bring to ini formatter-style tools include database credentials, API keys, service passwords, the exact categories that should never cross an unnecessary network boundary. Local processing is not a feature here; it is the architecture. Nothing uploads, and closing the tab forgets the file.
INI tidy-up options, compared
What separates INI File Formatter from the other ways to do this? The comparison table answers on the axes that matter: speed, privacy, and whether the method is documented.
| Alternative | Why people pick INI File Formatter instead |
|---|---|
| Server-side converters | Identical output without uploading customer data or credentials to a third party, and no file size quota |
| A configparser script in Python | Zero install, and no silent rewrites: configparser lowercases keys by default and re-quotes values, so its diff shows changes this formatter would never make |
| IDE plugins | Works in any browser on any machine, including the locked-down laptop in the meeting room |
Depth versus friction: the table tracks that trade all the way down. Single-use ini formatter questions land overwhelmingly on the friction side.
Playbook for tidy config files
The difference between trying INI File Formatter and trusting it is a handful of small habits. The accumulated playbook for this exact tool follows.
- Format before every diff: pasting the file both before and after an edit puts the change in one aligned line, which is the whole point of the tool.
- Keep the output in version control: the deterministic rules mean a formatted file never churns again, so the alignment cost is paid once.
When something behaves unexpectedly, the causes are almost always one of these:
- The equals signs do not align: look for a key longer than 24 characters in the file, since only its own line pushes past the column, and a line with no = at all is never padded.
- A comment shifted: comments glued to the end of a key=value line stay glued, because that whole line is one value; only whole-line comments starting with ; or # pass through as their own lines.
- Sections gained blank lines: by design, each [section] gets one blank line before and after, and runs of blank lines elsewhere collapse to one.
When ini formatter work goes wrong in a way this page did not predict, the contact page is the fastest route to a fix; verified reports are actioned the same week.
Frequently asked questions
These are the questions people actually search about the ini formatter, answered directly. If yours is missing, the contact page takes feature and question requests.
Does the INI File Formatter work on mobile?
Phone, tablet or desktop: INI File Formatter adapts. The layout reflows, the controls stay touch-friendly, and the computation happens locally on the device either way.
Is the output always identical for the same input?
Yes. The rules are fixed: pad keys to 24 characters, blank-line every [section], preserve comments verbatim, collapse runs of blank lines to one. Nothing random or heuristic runs in between, so the same file always formats identically, which is what makes it safe in a pre-commit hook.
Is the INI File Formatter free to use?
Free to use, unlimited: no account to create and no email to hand over. INI File Formatter runs entirely in your browser, so each extra use costs this site nothing and costs you nothing either. Heavy traffic does not change the price, because the price is zero.
Can the team access files I process with INI File Formatter?
No. Everything happens in your browser, in JavaScript. No server receives anything, and once the page has loaded you can drop the connection and keep formatting. That is what local-first means for ini formatter work.
Does the formatter change any values?
No. Values pass through byte-for-byte: quotes stay, spacing inside the value stays, and "42" remains "42". The formatter aligns text, it does not parse types, and INI has no type system to consult anyway; every value is a string until the reading application says otherwise.
Tools that pair well with config work
These tools share the INI File Formatter's workflow most often; the internal links exist because people genuinely chain them, not for keyword decoration.
- CSS Minifier & Beautifier: the same paste-and-format loop for stylesheets, with a size stat that usually shrinks instead of grows.
- HTML Beautifier & Minifier: tidy markup before a diff, or compress it before shipping.
- JavaScript Minifier: comments and whitespace stripped for production bundles, also fully in-browser.
Sources and further reading
INI has no single standard: php.ini, MySQL option files and Python's configparser each define their own reading rules, which is exactly why this page formats without interpreting. Those three references cover the readers this page's users meet most often, including how each one treats duplicate keys and case.
Sources and further reading
- PHP documentation: the configuration file (php.ini)(php.net)
- MySQL reference: option files (my.ini, my.cnf)(dev.mysql.com)
- Python 3: configparser module (INI parsing rules)(docs.python.org)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.