Convert between YAML and JSON instantly as you type. Real-time conversion, copy buttons, and clear error messages.
This converter translates between YAML and JSON in both directions, instantly, as you type. Paste YAML to get clean, indented JSON, or paste JSON to get readable YAML — no sign-up, no upload, no waiting.
YAML and JSON describe the same kind of data — maps, lists, strings, numbers, and booleans — but with different syntax. YAML leans on indentation and is friendlier for humans to read and edit, while JSON uses braces and brackets and is the lingua franca of web APIs. Converting between them is a daily chore for anyone who works with config files and services. People use it to:
Everything runs locally in your browser using the js-yaml library — your YAML and JSON are parsed on your own device and nothing is ever uploaded to a server.
Both represent the same structured data — maps, arrays, strings, numbers, and booleans. YAML uses indentation and is designed to be easy for humans to read and write, and it supports comments. JSON uses braces and brackets, is stricter, and is the standard format for web APIs. Anything expressible in JSON can be expressed in YAML, so converting between them is lossless for ordinary data.
YAML uses indentation to define nesting, so the number of leading spaces is structurally significant — unlike JSON, where braces define structure and whitespace is ignored. You must use spaces, never tabs, and keep indentation consistent. A misaligned line is the most common reason a YAML file fails to parse; the error message below the input shows the offending line.
Yes. Paste YAML into the top pane to get JSON, or paste JSON into the bottom pane to get YAML — conversion runs automatically as you type. You can also press the YAML → JSON or JSON → YAML buttons explicitly, or use the swap button to flip the contents of the two panes.
YAML supports comments (lines starting with #), but JSON has no comment syntax. When you convert YAML to JSON, comments are dropped because they are not part of the data. Converting JSON back to YAML therefore will not restore the original comments — only the actual keys and values are preserved.
Yes. This converter uses the js-yaml library, which resolves anchors (&name) and aliases (*name) when parsing. The referenced value is expanded inline in the resulting JSON, so a node reused via an alias appears as a full copy of its data rather than a reference.
Yes. Those tools all use YAML, and this converter is handy for inspecting their structure as JSON, validating that a config file parses, or generating JSON for a tool that expects it. Keep in mind it converts data only — it does not validate against a specific schema like a Kubernetes manifest or Compose file spec.
No. The conversion happens entirely in your browser using the js-yaml library. Your YAML and JSON content is parsed on your own device and never leaves it — nothing is uploaded to a server.