Nginx Formatter
Reindent local Nginx configuration and place complete directives on separate lines. Keep argument bytes, quote styles, escaped characters and comment text.
Format Nested Nginx Directives
Nginx Formatter: how to use it
- Paste a configuration, open a UTF-8 copy or select Load example.
- Choose an indentation style and select Format configuration. Review nested directives, comments and include lines.
- Copy the formatted text or download nginx-formatted.conf. Compare any multiline argument values with the original before use.
Limits and notes
Paste text or open a UTF-8 file up to 1 MB, with up to 250,000 characters. Include directives remain text and referenced files stay unread. Supports up to 128 block levels and 2,000,000 output characters. Formats Nginx-style directives and blocks, with LF between formatted lines. Quoted and escaped argument contents stay as supplied.
How your privacy works →Nginx Formatter: common questions
Will formatting expand an include directive?
The formatter keeps the include directive and its path or glob. It formats the configuration text that you supply.
What happens to quoted spaces and multiline strings?
Each argument keeps its original characters, including spaces, quotes, escapes and line endings inside the argument.
How are inline comments placed?
A comment that follows a token on the same source line stays with that token when the formatter lays out the configuration.