Nginx Config Formatter
Reformat an nginx.conf or server block with consistent indentation, one directive per line and comments kept, and check that every brace is closed.
Free · No sign-up · Your inputs stay in your browser
Input
Format an Nginx config
Output
Formatted
463 characters
One directive per line, blocks indented, comments kept where they were, quoted strings and regexes untouched. It checks the braces balance, not that the directives exist: nginx -t remains the test that matters.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Formatting is not validation
Balanced braces and tidy indentation do not mean Nginx will accept the file. nginx -t parses the whole configuration, resolves includes, and reports unknown directives and invalid values with the file and line. Run it after every change, before reloading.
Where messy configs come from
Configs pasted from tutorials, generated by panels or edited over years by several people drift into mixed tabs and spaces and multi-directive lines. A consistent layout makes the next diff readable, which matters more for a file that controls every request than for most code.