Skip to content
ohsudo, Home

YAML ↔ JSON Converter & Validator

Validate YAML and JSON and convert between them, with clear error messages.

● Runs 100% in your browser — nothing you type leaves this page.

Output

How to use it

  1. Paste YAML or JSON on the left. The tool detects which one it is — or choose the direction yourself.
  2. The converted result appears on the right; copy it with one click.
  3. If the input has an error, you get the line and column, so you can fix a broken Kubernetes manifest, Compose file or CI pipeline before it reaches the server.

Nothing is uploaded: the conversion runs in your browser, so it’s safe for configuration files.

What it understands

Warning

yes, no, on, off: in YAML 1.2 (this tool, and most modern parsers) they’re plain strings. Older parsers that follow YAML 1.1 — PyYAML, for example — read them as true / false. If a value must be a string everywhere, quote it: "no".

Common YAML errors

Error Usual cause
Tabs in indentation YAML allows only spaces for indentation
Nested mappings are not allowed in compact mappings A key: value where the value itself contains : — quote the value
Implicit keys need to be on a single line A missing : or a wrong indentation on the line before
Map keys must be unique The same key twice in one mapping
A list item at the wrong level - indented differently from its siblings

Docker Compose, kubectl and Python report the colon problem as mapping values are not allowed: see that article for both causes.

FAQ

Is JSON valid YAML?

Yes — YAML 1.2 is a superset of JSON, so any JSON document is also valid YAML. The opposite isn’t true: comments, anchors and unquoted strings only exist in YAML.

Why did my comments disappear?

JSON has no comments, so they’re lost when converting YAML to JSON — and converting back can’t restore them.

Articles

Learn more