YAML to JSON converter
Paste YAML or JSON and choose how large integers should be represented. Review the output and the before/after type report before copying or downloading it.
Paste a YAML configuration or JSON document. Conversion runs locally after JavaScript loads.
How it works
The parser resolves supported plain scalars using the YAML 1.2 core schema. It rejects repeated mapping keys. Integers are parsed with exact integer arithmetic; decimal tokens are normalized as text without rounding. Comments and original formatting are discarded.
By default, integers outside −9007199254740991 through 9007199254740991 become strings. You can instead preserve exact numeric text or reject these values. Exact JSON numbers may still round in a downstream JavaScript reader. Decimal text is preserved, but binary floating-point consumers may round it. Non-finite YAML values become strings because JSON has no Infinity or NaN number.
JSON-to-YAML emits quoted JSON flow syntax, which is also YAML 1.2 syntax. The same integer policy applies. The report identifies each leaf’s source type and output type; it shows the first 200 rows when a document is larger.
Worked examples
Core-schema values
count: 0x3A becomes the JSON number 58. enabled: yes remains the string "yes"; enabled: true becomes a boolean.
An integer beyond JavaScript’s safe range
id: 9007199254740993 becomes {"id":"9007199254740993"} under the default policy. Exact-number mode writes all 16 digits as a JSON number without converting through a JavaScript Number.
Supported YAML subset
Supports one document with space-indented mappings, sequences, sequence mapping entries, single-line flow arrays and maps, string keys, plain scalars, single-quoted strings and JSON-compatible double-quoted escapes. Quote keys that would otherwise resolve to numbers, booleans or null.
Rejects anchors, aliases, explicit tags, merge keys, directives, document markers, complex keys, block scalars, multiline quoted/plain scalars and non-JSON double-quoted escape sequences. This is a converter for that subset, not a full YAML validator. Application limits are 256 KiB of UTF-8 text, 10,000 lines, 64 nested levels and 10,000 parsed values.
Frequently asked questions
Are yes and no booleans?
Are dates converted to timestamps?
Why reject duplicate keys?
Will my large integer keep its digits?
Does this upload or save my configuration?
Sources
- YAML 1.2.2 — collections, scalars and core schema §10.3.2 (checked 2026-11-14)
- RFC 8259 — JSON objects and numbers §§4–6 (checked 2026-11-14)
Last reviewed 2026-11-14. The method is written out above so you can check our math.