← All Tools
YAML Converter🔒 100% local
YAML to JSON conversion. Privacy-first, no server uploads, no tracking.
YAML Converter picks its direction from the first character of the input: text starting with { or [ is parsed as JSON and printed as YAML, and anything else is parsed as YAML and printed as pretty JSON. Its YAML reader is a small subset parser covering nested maps, block lists, "- key: value" list items, inline arrays and quoted scalars, and it strips a trailing # comment from each line.
How to use it
- Paste either YAML or JSON into the Input box - there is no source selector to set.
- Press Process.
- Read the direction it detected, then the converted block under the --- YAML --- or --- JSON --- heading.
Worked example
name: John
age: 30becomesDetected: YAML to JSON
Parsed OK — 4 line(s) of JSON.
--- JSON ---
{
"name": "John",
"age": 30
}
Type notes:
YAML scalars are coerced — an unquoted 007 becomes the number 7, and unquoted yes/no/on/off become booleans in YAML 1.1 tools.
Quote anything that must stay a string, e.g. a ZIP code or a version like "1.10".
Paste the JSON above back in to confirm a lossless round trip.The first two lines report the detected direction and the size of the result.
When to use it
- Converting a Kubernetes or CI config snippet to JSON for a tool that only accepts JSON.
- Turning a JSON API response into YAML for a config file.
- Checking how a value will be typed after conversion, using the Type notes it prints.
What it does not do
- It is a subset parser: anchors and aliases, block scalars (| and >), document separators (---), multi-document input and flow mappings inside YAML input are unsupported or come through as plain text.
- Scalar typing is narrow - only true/True and false/False become booleans, so "flag: yes" converts to the string "yes".
- A comment is stripped even when it is part of the value, so "a: 1 # note" becomes the number 1.
- Direction detection looks only at the first character, so YAML that starts with a flow mapping such as {a: 1} is mistaken for JSON and fails with an Invalid JSON error instead of being converted.