Skip to content

YAML Preview

Validate YAML and convert it to and from JSON

About this tool

YAML uses indentation to express structure, so a single misplaced space can quietly produce a different document from the one you meant to write. In a CI config or a Kubernetes manifest that mistake often survives until something fails at runtime. This tool parses what you paste and shows you exactly how it is interpreted.

When parsing fails, the line and the reason are shown. Tab characters, a missing space after a colon and inconsistent indentation are the usual culprits, and all of them are easy to find once the parser tells you where it gave up.

Conversion works both ways: paste YAML to get JSON, or switch direction and paste JSON to get YAML. That is useful when migrating a config format or quoting a document elsewhere.


How to use it

  1. Paste YAML into the left pane. Multi-document files separated by `---` are supported.
  2. The parsed result appears on the right as JSON. Switch tabs for the tree view.
  3. If parsing fails, the line number and reason are shown instead.
  4. Switch to “JSON → YAML” to paste JSON and get YAML instead.

Features

Errors with line numbers

See where parsing failed and why, which makes broken indentation quick to fix.

Both directions

Convert YAML to JSON, or JSON to YAML, without leaving the page.

Multi-document files

Documents separated by `---` are each parsed and displayed.

Anchors and aliases

See the result with `&` anchors and `*` aliases resolved.


Frequently asked questions

Which version of YAML is supported?

Parsing follows YAML 1.2. Note that `yes` and `no`, which YAML 1.1 treated as booleans, are plain strings under 1.2.

Are comments preserved?

Comments are lost when converting to JSON, because JSON has no syntax for them.

Can I indent with tabs?

The YAML specification does not allow tab indentation, so it is reported as an error. Replace tabs with spaces.

Can I validate a Kubernetes manifest with it?

You can check that the syntax is valid. It does not validate the schema — field names and types are not checked.