Skip to main content
KalkuNet

YAML to JSON — YAML 1.2 Converter with Anchors, Merge Keys and Multi-Document Files

Parse multi-key YAML configurations safely into formatted RFC 8259 JSON.

Runs in your browserDeveloper · JSON, YAML, TOML, XML & CSV Converters
JSON indent:
  • Scalars follow the YAML 1.2 core schema: only true/false are booleans, so yes, no, on and off stay strings; 010 is 10 and 1:30 stays text. The YAML validator lists the values that YAML 1.1 tools read differently.
  • 2 << merge keys applied; keys written directly always win.

When to use the YAML Config to Standard JSON Converter

  • A complete YAML 1.2 parser

    Block and flow styles, | and > scalars with chomping, quoted strings with escapes, tags, anchors and several documents in one file. The parser passes all 402 cases of the official yaml-test-suite.

  • on and no stay strings

    Values follow the YAML 1.2 core schema: only true and false become booleans, 010 is 10 and 1:30 stays text. If the file is also read by YAML 1.1 tools, the YAML validator shows which values would differ.

  • Anchors and << merge keys

    An *alias is copied in full into the JSON. The << merge keys used by Docker Compose and GitLab CI can be applied; keys written directly always win over merged ones.

  • Whatever JSON cannot hold is reported

    .inf and .nan become null, number or boolean keys are written as strings, duplicate keys keep the last value and integers above 2^53 are written in full. Each case gets a note with its location.

Frequently asked questions

What about files with several documents (---)?

Each document becomes one item of a JSON array, in order. A file with one document gives a plain value.

Are comments converted?

No. JSON has no comments, so # comments are left out.

Why does the key 1 become "1"?

JSON object keys are always strings. Number, boolean or null keys are written as strings with a note; keys that are mappings or lists cannot be converted.

Is my data uploaded?

No. Parsing and conversion run in your browser.

Learn more