Developer

Encoders, converters & dev utilities

12 tools
Developer · Data-Format Converter (JSON ↔ CSV / YAML / XML)

YAML to JSON Converter

Convert YAML config into JSON for APIs, tooling, or anything that speaks JSON. The parser is YAML 1.2.2 (js-yaml core schema), which matters for correctness: under YAML 1.2 the values no, yes, on and off stay plain strings, so a country code like NO or a value like no is NOT silently coerced to the boolean false — the infamous "Norway problem" of the old YAML 1.1 rules simply does not happen here. Only true and false are booleans. Indentation-based YAML maps 1:1 onto JSON (YAML is a JSON superset), so key blocks become objects and dashed lists become arrays. JSON is emitted per RFC 8259. Runs 100% in your browser — your config never leaves the page. Free, no login.

Quick answer

YAML 1.2 → JSON is lossless: key blocks → objects, dashed lists → arrays, indentation → nesting

  • Worked example — db:\n host: x → {"db":{"host":"x"}}
  • No "Norway problem": under YAML 1.2 no/yes/on/off stay STRINGS, only true/false are booleans
  • YAML 1.2 (js-yaml core schema) parsing; JSON output per RFC 8259
  • 100% client-side — the YAML is parsed in your browser and never uploaded
Open the full Data-Format Converter (JSON ↔ CSV / YAML / XML)

Frequently asked questions

How do I convert YAML to JSON?

Paste your YAML and it is parsed into a value and re-emitted as JSON. Indentation-based structure maps directly: db: with host: x indented beneath becomes {"db":{"host":"x"}}. Key blocks become JSON objects, dash-prefixed lists become arrays, and scalars become the matching JSON scalar. It is fully reversible with the JSON-to-YAML direction and runs entirely in your browser.

What is the "Norway problem" and does this tool have it?

The Norway problem is a YAML 1.1 quirk where unquoted no, yes, on and off were parsed as booleans — so a list of country codes containing NO (Norway) would turn into false. This converter uses a YAML 1.2 parser (js-yaml core schema), under which those words stay plain strings and only true/false are booleans. So your no, off, or NO values are preserved as strings, not corrupted into booleans.

Is the conversion lossless?

For data, yes — YAML 1.2 is a superset of JSON, so both formats describe the same map/sequence/scalar data model and a YAML document converts to JSON without losing values. What is not preserved is YAML-only presentation: comments (# …) and anchors/aliases are resolved away, because JSON has no equivalent syntax for them. The underlying data is identical.

Related Data-Format Converter (JSON ↔ CSV / YAML / XML) pages