YAML formatter
Format and validate YAML, or convert between YAML and JSON — privately in your browser.
About the YAML formatter
Handytool's YAML formatter normalises YAML indentation, quote style, and key order using the standard js-yaml parser, and can also convert YAML to JSON or JSON back to YAML in one click. Useful for cleaning up Kubernetes manifests, GitHub Actions workflows, Helm values, and any config file that has drifted from a consistent style. The parser is the same one used by most JavaScript build tooling, so what validates here will validate in production.
YAML formatter features
- 01
Format and lint
Parses your YAML, drops trailing whitespace, normalises indentation to 2 or 4 spaces, and re-emits it. Syntax errors are surfaced with the exact line and reason.
- 02
YAML ↔ JSON
Convert YAML to JSON to feed it into a tool that only speaks JSON, or convert JSON back to YAML to make a config file human-friendly.
- 03
Preserves types
Numbers, booleans, nulls, and dates round-trip correctly through the parser, so a YAML file that goes in as YAML 1.2 comes out the same way.
YAML formatter FAQ
- Which YAML version does this support?
- YAML 1.2 by default — the version most modern tools (Kubernetes, GitHub Actions, Docker Compose) use. The parser is js-yaml, the same library used by most JavaScript build tooling.
- Will it preserve comments?
- No. Standard YAML parsers don't preserve comments through a parse-then-dump round trip — that's a known limitation of every JavaScript YAML library, not specific to this tool. Format your file before adding important comments back.
- What's the difference between formatting and converting?
- Formatting keeps the file as YAML and just normalises whitespace, key order, and indentation. Converting changes the format entirely — YAML to JSON or vice versa.
- Does this handle multi-document YAML?
- The first document of a multi-document YAML file is parsed and re-emitted. To work with all documents, split them with --- and process each separately.
Related tools
Developer →- Live
SQL formatter
Pretty-print SQL queries — PostgreSQL, MySQL, SQLite, BigQuery and standard SQL — privately in your browser.
DeveloperFreeRuns locallyOpen - Live
XML formatter
Pretty-print, minify, and validate XML — entirely in your browser.
DeveloperFreeRuns locallyOpen - Live
GraphQL formatter
Pretty-print and validate GraphQL queries, mutations, and schemas — privately in your browser.
DeveloperFreeRuns locallyOpen
Explore other tools
All tools →- Live
PDF to JPG
Convert each page of a PDF into a sharp JPG, PNG, or WebP image right in your browser — no upload, no quality loss.
PDFFreeRuns locallyOpen - Live
Remove background
Erase the background of a photo using an in-browser AI model — no upload, your images stay on your device.
ImageFreeRuns locallyOpen - Live
Trim Video
Cut the start or end of a video with frame-level precision.
VideoFreeOpen - Live
Trim audio
Cut a section of an audio file.
AudioFreeRuns locallyOpen - Live
Markdown to HTML
Convert Markdown into clean HTML right in your browser.
DocumentFreeRuns locallyOpen