Skip to content
Simple Tools

YAML to JSON converter

Read a single YAML 1.2 document and produce JSON without alias expansion or lost large numbers.

Enter data

One YAML 1.2 document, up to 20,000 UTF-16 units. Fields marked with an asterisk are required.

Up to 20,000 UTF-16 units. One YAML 1.2 document.

About this tool

YAML includes constructs with no direct JSON equivalent, so not every document can be converted. This tool accepts a bounded YAML 1.2 Core profile: maps with string keys, sequences and scalar values. Comments and presentation style disappear. Quote codes with leading zeros to prevent numeric interpretation.

How to use the calculator

  1. Paste one YAML 1.2 document. Quote string identifiers and check indentation.
  2. Remove anchors, aliases, explicit tags and merge constructs under your data rules.
  3. Select “Process”; copy JSON and check it against the destination API.

Calculation details

Formula and calculation method

A YAML 1.2 Core parser builds a tree without expanding aliases. String keys and values are serialized as JSON literals. Decimal number tokens are normalized textually; hexadecimal/octal integers use BigInt without intermediate Number rounding.

Worked example

Separate lines code: "001", active: true and city: Łódź produce {"code":"001","active":true,"city":"Łódź"}. Unquoted 001 becomes number 1. Untagged on and 2026-10-02 remain strings under this profile.

Limitations

  • Input up to 20,000 UTF-16 units, 32 container levels, 10,000 nodes including keys and output up to 500,000 units. One document with a value; comments without data are insufficient.
  • Anchors, aliases, merge (<<), explicit tags, YAML 1.1, multiple documents, duplicate/non-string keys, .inf, .nan and unpaired Unicode surrogates are rejected. Files and network resources are not read.
  • Comments, quote style, indentation and hexadecimal/octal spelling are not reconstructed. Large numbers stay exact in JSON text, but destination parsing may lose precision.

Sources

Frequently asked questions

Does on mean true?

Not in YAML 1.2 Core. on/off remain strings. YAML 1.1 applications may use different rules.

Why are aliases rejected?

JSON does not carry YAML reference identity. Aliases are not expanded, avoiding cycles and uncontrolled data growth.

Will comments be retained?

No. JSON has no comment syntax. Keep the original YAML if comments matter.

Is content uploaded or saved?

Input and output are not submitted to a server or analytics or saved in form history or the URL. Copying is a separate action. Reset cannot remove earlier copies, printouts or extension data. Do not paste secrets.

Read the supporting guide

Generator

UUID and GUID generator

Generate 1–100 UUIDv4 identifiers using Web Crypto randomness, locally and without a timestamp.

Open tool
Generator

JSON to YAML converter

Convert JSON into readable YAML with quoted strings, no anchors and unchanged number tokens.

Open tool
Generator

JSON Schema generator

Create a working JSON Schema 2020-12 from a sample with an explicit additional-object-members policy.

Open tool