Nginx Config Formatter & Checker
WebEverything runs locally in your browser — nothing is uploaded
Lay out an nginx config again: indent it by brace depth, or collapse it to one line. Beyond formatting it runs a few checks — whether braces are paired, which directive is missing its closing `;`, whether a `server_name` is duplicated on the same port, and whether `proxy_pass` carries a path (which changes the URI the backend receives — one of the most common nginx traps). Results report the line and the reason; they do not decide for you. A `#` comment or a quoted `{}` / `;` never confuses the parser. Everything runs in your browser, so the config stays on this device.
Features
- Indent by brace depth: 2 spaces, 4 spaces or a tab
- Collapse to a single line for diffing or pasting
- Check brace pairing and report the line of every missing or extra one
- Check for missing trailing `;` (including across lines and at end of file)
- Find duplicate `server_name` values on the same port
- Flag more than one `default_server` on a port
- Explain how a path on `proxy_pass` changes the backend URI
- Braces and semicolons inside comments and quotes are never misread
- Copy one line at a time, or the whole result
How to use
- Paste or drop an nginx config into the box
- Choose the indent, whether to expand, and whether to collapse to one line
- The formatted config and the checks update as you type
- Use the copy button on a row to take just that part
FAQ
- What is the difference between `proxy_pass http://backend` and `http://backend/`?
- It decides what URI the backend receives. With no path, nginx passes the original request URI through unchanged. With a path — even a bare `/` — the part matched by the location is replaced by that path. So `location /api/ { proxy_pass http://backend/; }` turns `/api/users` into `/users`, while `proxy_pass http://backend;` passes `/api/users` on. The difference is almost invisible in the logs, and it is the first line to check when chasing a 404.
- Why does a missing semicolon point at a whole line?
- nginx lets one directive span several lines (a continuation line is usually indented), so the tool cannot judge a single line alone. Its rule is: a line whose directive has not yet ended with `;`, `{` or `}` is followed by a token that starts in column 1 — that means the previous line forgot its semicolon. Indented continuation lines are never flagged, because their tokens do not start in column 1.
- Why are comments dropped in one-line mode?
- Because a `#` comment cannot live on a shared line: everything after `#` up to the end of the line is commented out, which in a single-line output would swallow the rest of the config. The risk is what gets removed, not your comments — use the expand mode when you want to keep them.
- Is the config uploaded anywhere?
- No. Tokenising, indenting and checking all happen in the browser; the page makes no requests at all, so it works offline.
Related tools
Config Validator
WebCheck a package.json, .env, robots.txt, sitemap.xml or HTTP headers. Findings come in three levels — errors, warnings, suggestions — each with a reason.
CSS Formatter
FormatFormat CSS online: one declaration per line, selectors split at commas. Minify only strips structural whitespace, keeping meaningful spaces in values.
robots.txt Generator
WebGenerate a robots.txt: allow everything, block AI training crawlers, block everything or use a custom list, plus paths, Sitemap and Crawl-delay.
URL Parser
WebParse a URL into scheme, host, port, path, query parameters and fragment, with each parameter shown raw and decoded. Runs entirely in your browser.
User-Agent Parser
WebParse a user agent into browser, version, OS, device type and engine, and see which rules matched. Pattern matching only. Runs entirely in your browser.
HTTP Status Codes
WebLook up an HTTP status code for its meaning, 1xx–5xx class, typical uses and common traps. Runs entirely in your browser.