Code · Made a little simpler

TOML Formatter

Normalize assignment spacing, line breaks, and indentation in local TOML. Compare your source and the verified result before copying or downloading.

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

Undo: Ctrl/Cmd+Z · Redo: Ctrl/Cmd+Shift+Z or Ctrl+Y. Up to 20 steps and 4 million retained characters in this tab. Clear discards history.

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

TOML Formatter: how to use it

  1. Paste TOML, open a UTF-8 file, or load the service example.
  2. Choose a TOML version and use two or four spaces to indent entries already on separate lines.
  3. Format the TOML, compare the before and after panes, and copy or download the result.

Limits and notes

Use up to 1 MiB per UTF-8 file or 1,048,576 pasted characters, with up to 128 levels of nested values or tables.

How your privacy works →

TOML Formatter: common questions

Will my comments and multiline string text survive formatting?

Yes. The formatter changes spacing around TOML tokens and preserves the content of comment and string tokens, including line breaks in multiline strings.

Does the formatter reorder arrays of tables?

It keeps table, key, and item order from the source.

How do I format for a parser that uses TOML 1.0?

Choose TOML 1.0 compatibility. The formatter checks that version before and after changing whitespace.

Guides