Development
YAML Formatter
Parse a YAML document and serialize it with consistent indentation. Review the values before replacing a hand-maintained configuration file.
About this tool
When to use it
Parse a YAML document and serialize it with consistent indentation. Review the values before replacing a hand-maintained configuration file.
How to use it
Paste one document, select Format YAML, and inspect lists and scalar types. Copy or download the result after checking that important comments are retained elsewhere. Use the format converters when the target system needs JSON or TOML instead.
Guide updated . Examples checked against this implementation.
Worked examples
Expand a flow-style list
Input
tools: [JSON, YAML]Expected output
tools:
- JSON
- YAMLThe values stay a list while presentation changes to block style. The formatter uses two-space indentation and removes the final newline from its output.
Errors and unsupported input
tools: [JSON,Close the flow list or rewrite it as an indented block sequence. Follow the parser location to repair the incomplete document.
Continue this workflow
- YAML ↔ JSON Converter: Create JSON output when an API expects JSON configuration.
Questions
Frequently asked questions
Why did quotation marks disappear?
The serializer chooses a representation for the parsed value. Quote-sensitive or type-sensitive configuration should be checked with its receiving application.