YAML Formatter & Validator

Paste YAML to reformat it with consistent indentation, validate it, or minify it to flow style. Errors report the exact line and column, taken from the parser rather than guessed at. More useful than the syntax check are the two warnings for mistakes that parse perfectly well: a tab in the indentation, which YAML forbids and your editor renders invisibly, and a duplicate key, where the last one silently wins and the first half of your configuration is discarded without complaint — both named with their line numbers. Multi-document files separated by --- keep every document, which matters for Kubernetes manifests. One honest caveat: reformatting removes comments, because comments are not part of the parsed document and no formatter that reparses can keep them. You will be warned before that happens, and validation never rewrites anything.

Mistakes that still parse

ProblemWhat actually happens
Tab in indentationRejected outright — and invisible in your editor
Duplicate keyLast wins, earlier one discarded silently
Only the first document readThe rest of a --- file is lost
Unquoted yes / no / onOlder parsers read them as booleans

When to use it

  1. Fix the indentation in a YAML file that a server rejected.
  2. Find the line of a YAML error a CI log only half reported.
  3. Catch a duplicate key that is silently discarding half your config.
  4. Check a Kubernetes manifest before applying it.
  5. Normalise indentation across a docker-compose or CI config file.

How to Use

  1. Paste your YAML, or drop files in.
  2. Read the validation result and any warnings under the input.
  3. Copy the reformatted output, or switch on minify.

Features

  1. Validation with the exact line and column
  2. Warns about tabs in indentation — invisible and illegal
  3. Warns about duplicate keys that silently override
  4. Multi-document files fully preserved
  5. Two- or four-space indentation, or flow-style minify
  6. 100% client-side, nothing uploaded

FAQs

Is my YAML uploaded?

No. Parsing, validation and formatting all happen in your browser. Config files often hold secrets, so nothing is transmitted.

Will formatting keep my comments?

No, and no formatter that reparses the file can. YAML comments are discarded by the parser because they are not part of the document, so re-emitting produces the data without them. You get a warning before this happens. If the comments matter, use the validation output alone — it never rewrites your file.

Why does my YAML fail when it looks correctly indented?

Almost always a tab. YAML forbids tabs in indentation, and most editors render one exactly like spaces, so the file looks right and the parser refuses it. This flags the line for you.

What is wrong with a duplicate key?

Nothing, as far as the parser is concerned — which is the problem. The last value wins and the earlier one vanishes with no error, so a setting you defined can be silently overridden by one further down the file. Both line numbers are reported here.

Does it handle multi-document files?

Yes. Documents separated by --- are each reformatted and all kept. Tools that load only the first document quietly discard the rest, which in a Kubernetes manifest usually means losing most of the deployment.

What does minify do to YAML?

It re-emits in flow style, which looks JSON-like and fits on one line per document. YAML is a superset of JSON, so this is still valid YAML — useful for embedding in a single field, less useful for anything a person has to read.

Technical Details

Validation reports the line and column from the parser's own error mark rather than guessing from the message, and converts its zero-based count to the one-based numbering every editor uses, so the reported line is the line you jump to. Beyond outright syntax errors, two lint warnings cover the mistakes that still parse and therefore cost the most time. A tab in the indentation is illegal in YAML and invisible in most editors, which is why a file that looks correct is rejected by the server. A duplicate key parses fine and the last one silently wins, so half a configuration is discarded without any error at all — the tool names both line numbers. Duplicate detection scans root-level keys; nested duplicates need the parser's own state and are not covered. Formatting reparses and re-emits, which normalises indentation to a consistent depth and unwraps long lines rather than folding them. Multi-document files split on their document separators and every document is re-emitted, because loading only the first would silently discard the rest — in a Kubernetes manifest that usually means losing most of the deployment. The honest limitation is comments: they are not part of the parsed document, so no formatter that reparses can preserve them, and this one warns before rewriting a file that has any. Validation never rewrites, so it is safe on a commented file. Everything runs in your browser.

Data & CSV Tools

Data & CSV Tools

  • XML to JSON
  • Query String to JSON
  • Config to JSON
  • CSV Manipulator
  • Table Format Converter
  • CSV Cleaner
  • CSV Viewer
  • JSON \u21c4 TOON