JSON ↔ YAML Converter
Convert JSON to YAML or YAML back to JSON, in either direction, with indent control.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the json ↔ yaml converter
- Choose a direction: JSON → YAML or YAML → JSON.
- Paste your document.
- Copy or download the converted output.
About this tool
YAML and JSON describe the same kinds of data, which is why config files and API payloads move between them so often. YAML is easier to write and read — no braces, and it supports comments — while JSON is what most APIs and programs speak.
Conversion goes through a real YAML parser, not a text substitution, so anchors, multi-line strings and nested sequences are handled correctly. One thing cannot survive the round trip: YAML comments have no JSON equivalent, so converting YAML to JSON drops them. Converting back gives you valid YAML, not your original file's formatting.
Common uses
- Turning an API's JSON example into a Kubernetes manifest.
- Converting a CI config to JSON for a script to read.
- Checking that a YAML file parses at all.
Frequently asked questions
- Are my comments preserved?
- No. JSON has no way to express a comment, so converting YAML to JSON loses them. Keep the original if the comments matter.
- Why does my YAML fail to parse?
- Almost always indentation — YAML is whitespace-sensitive and tabs are not allowed for indentation. The error message gives the line where parsing stopped.
Related tools
JSON Formatter
Format, validate and minify JSON with clear error messages that point at the exact position.
CSV to JSON
Convert CSV into an array of JSON objects, with delimiter detection and optional typing.
JSON to CSV
Turn an array of JSON objects into CSV, flattening nested objects into dotted columns.
XML Formatter & Minifier
Indent XML to reveal its structure, or minify it back to a single line.