YAML ↔ JSON Converter
Cmd/Ctrl+Enter saves the current input to history.
Advertisement
Paste YAML, get JSON — or the reverse. YAML is whitespace-significant in a way JSON isn't, so parse errors here report the exact line that failed rather than a generic "invalid YAML" message, which matters most for the indentation mistakes that are the most common way a YAML file breaks.
Frequently asked questions
- Why does it say "all mapping items must start at the same column"?
- That's a YAML indentation error, not a bug in this converter — YAML is whitespace-significant, and sibling keys at the same nesting level must line up at exactly the same column. Mixing tabs and spaces, or a stray extra space on one line, is the usual cause. See the guide below for the full fix.
- Does it tell me which line the error is on?
- Yes. YAML parse errors report an exact line number, which this tool surfaces directly in the error message instead of just "invalid YAML".
- Does converting JSON to YAML lose any data?
- No — it's a structural conversion, not a summary. Every key, value, and nesting level in the JSON is represented in the YAML output; only the syntax changes.
- Is my data uploaded anywhere?
- No. Conversion happens locally in your browser tab — nothing is sent to a server.
Read the full guide for this tool →
Related tools & guides
Part of JSON Tools: Format, Validate, Diff, Convert, and Generate Types
Tools
Guides
- Semantic JSON Diff vs Text Diff: Key Order, Array Order, and Type Coercion
- Converting CSV to JSON: Where It Actually Goes Wrong
- Generating Mock JSON Data From a Schema — Seeds, Determinism, and What Gets Faked
- JSON Formatting and Validation: What Actually Trips People Up
- What "Required" Means When You Infer a JSON Schema From Samples
- JSON Schema vs Zod: They Solve Different Halves of the Same Problem
- quicktype vs Live Types: Different Jobs, Not Direct Competitors
- "Unexpected Token in JSON at Position 0" — What It Actually Means
- XML to JSON Conversion: Attributes, Mixed Text, and Why Repeated Tags Become Arrays
- Fixing Double-Encoded JSON Strings (JSON.stringify Twice)
- Detecting Breaking Changes in a JSON API Response
- JSON vs YAML for Config Files
Advertisement