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
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
- Price
- Free
- Account needed
- None
- Where processing happens
- On your device
How to use YAML to JSON
- 1
Paste your YAML
Paste your YAML.
- 2
Read the JSON
Read the JSON.
- 3
Copy or download
Copy or download.
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. |
| Price | Free. Supported by clearly labelled 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