Format, validate and minify YAML in your browser, with line and column error messages, adjustable indentation, key sorting and multi-document support.
YAML is whitespace-sensitive, so a single misplaced indent or tab can break a Kubernetes manifest, a CI pipeline or a Docker Compose file. This tool parses your YAML with js-yaml, reports the exact line and column of any syntax error, and re-prints valid documents with consistent indentation, optional key sorting, or a compact flow-style minified form. It is a formatter and validator for YAML itself; to convert between YAML, JSON and CSV use the Data Format Converter. Everything runs in your browser.
The Data Format Converter changes data between YAML, JSON and CSV. This tool keeps your data in YAML and focuses on checking and tidying it: it validates syntax with line and column errors, normalizes indentation, can sort keys and supports multi-document files.
No. The parser reads your YAML into data and the formatter writes the data back out, and comments are not part of the data, so they are dropped. Use Validate if you only want to check a file without changing it, and keep your original.
A compact flow-style representation, where mappings use braces and lists use square brackets, for example {name: app, ports: [80, 443]}. It is still valid YAML and parses to the same data, but it is not the way YAML is usually written by hand.
The YAML specification forbids tab characters for indentation; only spaces are allowed. If your file mixes them, the validator reports the line and column where it first fails, and Format will output clean space-based indentation once the file parses.
Yes. Documents separated by --- lines are each validated and formatted, and the output keeps them separated by ---. The status message tells you how many documents were found.
No. Parsing and formatting happen in your browser with the js-yaml library, which is loaded the first time you use a YAML tool. Your configuration files, which often contain hostnames and settings you would rather not share, never leave your device.
← All tools · Blog · Cheat sheets · FAQ