Last updated: October 2026
JSON to YAML converter online free — both directions
When you'd convert
APIs speak JSON, but config files speak YAML — Docker Compose files, GitHub Actions workflows, Kubernetes manifests. Moving a config between the two by hand is error-prone; this does it in one click. Going the other way, paste a YAML config to get JSON you can feed to jq, a REST client or a script. Starting from a spreadsheet? Our CSV to JSON converter gets you to JSON first, and this tool takes you the rest of the way to YAML.
What the YAML side supports
Nested maps and lists with space indentation, quoted and unquoted strings, numbers, booleans, null, # comments and inline {key: value} / [list] syntax. Strings that would be misread (like yes or 01234) are automatically quoted on the way out. Anchors (&), tags and multi-line block scalars (|, >) aren't supported — you'll get a clear error instead of silent corruption.
Tabs are illegal in YAML (and other ways it silently misreads you)
The single biggest source of YAML errors: tabs are forbidden for indentation — spaces only, per the YAML specification. A config that looks perfectly aligned with tabs will fail to parse, often with an error pointing nowhere near the real problem. If your YAML won't parse, check for tabs first.
The second trap is unquoted strings. YAML 1.1 famously reads no, yes, on and off as booleans — the "Norway problem" — and a value like 01234 can be misread as a number. This converter quotes those automatically on the way out. And when a config value itself contains a URL with special characters, run it through our URL encoder first so the YAML stays valid.
Frequently asked questions
How do I convert JSON to YAML?
Can I convert YAML back to JSON?
What's the difference between JSON and YAML?
Does it validate my input?
Is my data private?
Why are some values quoted in the YAML output?
yes, no, on or true, number-like strings (e.g. a zip code "78701"), values containing colons or #, and empty strings all get double quotes — otherwise they'd parse back as a different type. Selective quoting protects type fidelity; it's deliberate, not inconsistent.What are the most common JSON-to-YAML conversion mistakes?
Is every JSON document valid YAML?
Will comments survive a YAML → JSON → YAML round-trip?
# comments are dropped the moment you convert to JSON. If you want to annotate a config, do it in the final YAML output — never in an intermediate step.When should I choose YAML over JSON?
Why doesn't the converter generate anchors or aliases?
&), aliases, or tags are ever generated, because auto-generated shorthand confuses more than it helps in generated files. For the same reason the input parser rejects anchors, tags and multi-line block scalars with a clear error instead of silently misparsing them.