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
Specification

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

How to use YAML to JSON

  1. 1

    Paste your YAML

    Paste your YAML.

  2. 2

    Read the JSON

    Read the JSON.

  3. 3

    Copy or download

    Copy or download.

Questions

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.

Background

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

Specification of the YAML to JSON tool
Opens onYAML in, JSON out. Both selectors change without leaving the page.
OutputJSON indented by two spaces, ready to copy or download as a .json file.
Anchors and aliasesResolved into plain values, because JSON has no way to write a reference.
ErrorsA sentence naming the line, which is where indentation problems almost always are.
PriceFree. Supported by clearly labelled ads outside the working area.
Account neededNo.
Where processing happensIn your browser tab. Nothing is uploaded.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS