YAML to JSON
YAML in, JSON out, without leaving the page.
FREE - NO SIGN-UP - RUNS ON YOUR DEVICE
Runs in your browser tab
- YAMLin
- JSONout
- 0uploads
- 1 tapto save
What you can count on
- Linein every error
- Errors name the line that broke
- No stack traces to decode
- 2directions
- Opens on YAML into JSON
- Switch back without leaving
- 0uploads
- Your data stays in this tab
- Nothing is sent anywhere
YAML to JSON at a glance
- Opens on
- YAML into JSON
- Output
- Two-space indented JSON
- Anchors and aliases
- Resolved into plain values
- Errors
- Sentence with the line number
- Two buttons worth knowing
- Reverse, and same-format tidy
- Formats
- JSON, YAML, CSV, TOML, JSONL
- Price
- Free
- Account needed
- None
- Where processing happens
- On your device
How to use YAML to JSON
- 1
Paste your YAML
A sample is already loaded, so replace it with your own document.
- 2
Read the JSON
The JSON appears below as you type, or a sentence telling you which line does not parse.
- 3
Copy or download
Copy the JSON in one tap, or download it as a .json file.
Frequently asked questions
What happens to comments?
They are dropped. JSON has no syntax for a comment, so there is nowhere for them to go. Keep the YAML if the comments matter to you.
Why does my YAML not parse?
Indentation, nearly every time. The message names the line, and the problem is usually a tab where spaces belong or a key indented one level too far.
Can I go the other way?
Yes. Change the to selector to YAML, or press Reverse, which also puts the result back in the box so you can turn it straight back.
What changes on the way across
The panel opens already set to YAML in and JSON out, with a sample loaded. Replace it with your own YAML and the JSON appears as you type. Both selectors still move.
- Comments and blank lines are dropped, because JSON has no syntax for either.
- Anchors and aliases are resolved into the values they point at.
- Dates written without quotes come across as text, which is what JSON has.
Full specification
| Opens on | YAML in, JSON out. Both selectors change without leaving the page. |
|---|---|
| Output | JSON indented by two spaces, ready to copy or download as a .json file. |
| Anchors and aliases | Resolved into plain values, because JSON has no way to write a reference. |
| Errors | A sentence naming the line, which is where indentation problems almost always are. |
| Two buttons worth knowing | Reverse swaps the formats and feeds the result back in, so you can check a conversion. Setting both selectors the same tidies instead of converting. |
| Formats | Five first-class formats — JSON, YAML, CSV, TOML and JSONL — and any direction between them. JSONL is in both selectors, not a side option. |
| Price | Free. Supported by clearly labeled ads outside the working area. |
| Account needed | No. |
| Where processing happens | In your browser tab. Nothing is uploaded. |
Keep going with the same files
All developer tools: Developer tools on SPOTTOOLS