YAML Formatter & Validator
Pretty-print, minify, validate, and convert YAML — client-side.
output
result
About YAML formatting
YAML is everywhere in config: CI pipelines, Kubernetes manifests, docker-compose, and application settings. But hand-written YAML drifts — mixed indentation, inconsistent quoting, and trailing spaces. This formatter parses your document withjs-yaml (a full YAML 1.2 implementation) and re-emits it in a canonical 2-space block style, so it reads cleanly and behaves predictably. Everything runs in your browser.
Pretty, minify, and JSON
Pretty re-emits block-style YAML with 2-space indentation. Minifyproduces a single-line flow-style YAML document — handy when you need the smallest possible representation. → JSON converts the parsed YAML to JSON, the exact complement of the JSON to YAMLconverter. Because parsing and dumping both go through a real YAML engine, anchors and aliases are resolved before output, so the result is self-contained.
Edge cases
Multi-document streams (a file with several ---separated documents) are handled as the first document. Complex keys, custom tags, and extremely long documents are all supported by the underlying parser, and syntax errors report the offending line and column in the status bar.
Related tools
Generate YAML from a JSON document with the JSON to YAMLconverter, or validate the JSON equivalent against a schema with the JSON Schema validator.
FAQ
Is full YAML supported?
Yes. The tool uses js-yaml (YAML 1.2), so anchors, aliases, tags, block scalars, and flow collections parse correctly.
Is my YAML sent to a server?
No. Parsing and formatting run entirely in your browser — the document never leaves this tab.