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.
Format Service TOML and Keep Its Comments
Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
Find & replace in input
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.
TOML Formatter: how to use it
- Paste TOML, open a UTF-8 file, or load the service example.
- Choose a TOML version and use two or four spaces to indent entries already on separate lines.
- 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.