Code · Made a little simpler

Nginx Formatter

Reindent local Nginx configuration and place complete directives on separate lines. Keep argument bytes, quote styles, escaped characters and comment text.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Nginx Formatter: how to use it

  1. Paste a configuration, open a UTF-8 copy or select Load example.
  2. Choose an indentation style and select Format configuration. Review nested directives, comments and include lines.
  3. 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.

Guides