YAML Formatter & Validator

Beautify and validate YAML with selectable indent and helpful error messages.

Paste any YAML and instantly get a pretty-printed, validated version. Choose 2- or 4-space indent, see error messages with line numbers when parsing fails, and copy the cleaned output. Everything runs locally in your browser via js-yaml.

Common use cases

  • Tidy up Kubernetes manifests, Helm values and Docker Compose files
  • Validate GitHub Actions and CircleCI workflow files before committing
  • Re-indent hand-edited Ansible playbooks and OpenAPI specs
  • Catch YAML syntax errors (mixed tabs/spaces, bad indentation) instantly

Frequently asked questions

Does my YAML get uploaded?
No — parsing and formatting happen in your browser using js-yaml. Nothing is sent to a server.
Will it preserve comments?
No. Standard YAML libraries (including js-yaml) drop comments because they aren't part of the parsed data model. If you need comment-preserving formatting, edit by hand.
What spec does it follow?
YAML 1.2 via the js-yaml library, which is widely used in Node.js, Webpack, ESLint and many other tools.

Related tools