← All Tools
YAML JSON Converter🔒 100% local
YAML to JSON and back. Privacy-first, no server uploads, no tracking.
YAML JSON Converter also works in both directions, deciding from whether the trimmed input opens with { or [. JSON is parsed and re-emitted as YAML; YAML goes through its own minimal indentation reader and comes back as pretty JSON. Its scalar rules are broader than the other YAML page's: yes and no join true and false as booleans.
How to use it
- Paste YAML or JSON into the Input box.
- Press Process.
- Read the detected direction on the first line, then the converted document under the output heading.
Worked example
name: John
age: 30becomesDetected input: YAML
=== JSON output ===
{
"name": "John",
"age": 30
}The heading names the direction it detected, here YAML in, JSON out.
items:
- id: 1
- id: 2becomesDetected input: YAML
=== JSON output ===
{
"items": [
{
"id": 1
},
{
"id": 2
}
]
}Block sequences now parse: a list of maps becomes a JSON array of objects.
When to use it
- Turning a small YAML fragment into JSON to paste into a test fixture or a JS tool.
- Converting a JSON object to YAML when you want an indented view of it.
- Checking what a bare yes or no in a config becomes after conversion to JSON.
What it does not do
- Trailing comments are not stripped, only whole-line ones, so "a: 1 # note" is parsed as the string "1 # note" - the other page (slug yaml-converter) returns the number 1.
- Its boolean coercion swallows yes and no in any case, turning a config value you meant as a string into true or false.
- YAML output quotes strings with JSON.stringify, so the emitted YAML carries JSON-style double quotes rather than plain or single-quoted scalars.
- The indentation reader handles flat maps, lists and one level of nesting; deeper documents or inline flow syntax can still confuse it.