JSON ⇄ YAML Converter
Turn JSON into YAML or YAML into JSON as you type. Multi-document YAML is supported, and YAML is always loaded safely: custom tags are rejected.
Runs in your browser — nothing is uploaded.
A top-level array becomes documents separated by ---.
How to use it
- Pick the direction: JSON to YAML or YAML to JSON, then paste your text. The result updates as you type.
- Choose the indentation and, if you like, sort the keys.
- A YAML file with several documents (separated by ---) becomes a JSON array. In the other direction, tick “Array as several documents” to split a top-level array back into documents.
- If the input is invalid, the message gives the line and column.
Frequently asked questions
Is my data uploaded?
No. The conversion runs in your browser and nothing is sent anywhere.
Is loading YAML safe?
Yes. Only the standard YAML types are understood. Tags such as !!js/function or !!python/object are rejected, so a document cannot run code or create arbitrary objects. Documents that expand into huge trees through aliases are refused too.
Which YAML version is used?
YAML 1.2 (core schema). So yes, no and on stay text rather than becoming booleans, and dates such as 2001-01-01 stay text.
What is lost when converting YAML to JSON?
Comments, anchors (their values are copied to each alias) and key order guarantees are not kept, since JSON has no equivalent. Values such as .inf and .nan become null.
Why are some strings quoted in the YAML output?
Text that YAML would read as a number, boolean or null, such as "true" or "123", is quoted so it keeps its meaning when read back.