YAML Formatter & Validator

Validate YAML syntax, format/beautify YAML, and convert YAML to JSON. Instant error detection with line numbers. Runs entirely in your browser.

Paste YAML to validate
YAML Input
Formatted YAML

YAML Formatter — Format and Beautify YAML

The YAML formatter re-serialises your YAML with consistent indentation, normalised quoting, and proper structure. It uses js-yaml, the most widely adopted YAML parser for JavaScript. The formatter also validates the YAML — any syntax error is caught and displayed with the line number and description.

YAML Validator — Lint and Validate YAML Online

The validator checks your YAML against the YAML 1.2 specification. Common errors it catches: incorrect indentation (YAML is whitespace-sensitive), duplicate keys, unmatched quotes, invalid characters, tabs used instead of spaces (YAML does not allow tabs for indentation), and structural issues like missing colons or incorrect list markers.

YAML to JSON Converter

Switch to the JSON tab to see your YAML converted to JSON. YAML is a superset of JSON — every valid JSON document is valid YAML. YAML is easier to write and read by humans; JSON is the standard for APIs and data interchange. This converter is useful for debugging API payloads or converting configuration files.

Paste your YAML above. The validator runs instantly — a green badge means valid, red shows the error with line number. No data is sent to any server.
The YAML specification explicitly prohibits tab characters for indentation because different editors interpret tab width differently. Always use spaces (2 or 4) for YAML indentation.
YAML is a human-friendly superset of JSON. YAML supports comments, multi-line strings, and less verbose syntax. JSON is the standard for APIs and has wider tooling support. Switch to the JSON tab to see your YAML as JSON.