YAML Formatter & Validator
Paste any YAML and get a re-emitted clean version: consistent indentation, configurable line width, optional alphabetical key sort, optional anchor / reference expansion. Errors are shown inline with the parser's location info. Useful for cleaning up GitHub Actions workflows, Kubernetes manifests, Astro / Vite configs, or any hand-edited YAML that drifted.
How to use
- Paste your YAML in the input.
- Tweak indent, line width, sort keys, or expand anchors.
- Read the formatted output and copy.
Frequently asked questions
- What YAML version is supported?
- YAML 1.2 via js-yaml — the same parser used in many CI tools. Anchors (&) and references (*) are accepted; merge keys (<<: *anchor) are normalized when 'expand anchors' is on.
- Are comments preserved?
- No. js-yaml drops comments because the YAML spec doesn't attach them to nodes. If your YAML has critical comments, format a section at a time and paste comments back manually.
- What does 'expand anchors' do?
- When on, the formatter inlines anchored values everywhere they're referenced, so the output has no & / * markers. Off keeps the original references.
- Why is the line width 100 by default?
- 100 columns matches GitHub's default code review width — wide enough for most inline scalars without word-wrapping in diffs.
Related tools
JSON Formatter & Validator
Format, beautify, minify, and validate JSON right in your browser.
XML Formatter & Minifier
Beautify XML with clean indentation or minify it to one line, in your browser.
SQL Formatter
Format and beautify SQL across 10 dialects (PostgreSQL, MySQL, BigQuery, Snowflake, T-SQL …).
Column Aligner — Align Text into Columns
Pad whitespace, comma or tab separated rows into neatly aligned columns, in your browser.
UUID Inspector (Version, Variant, Time)
Paste any UUID to see its version (1–8), variant, and — for time-based v1, v6, and v7 — the embedded creation timestamp, clock sequence, and node/MAC, all decoded in your browser.
JWT Decoder
Decode a JSON Web Token to inspect its header, claims, and expiration.