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?
Not under the YAML 1.2 core schema. They are strings. true, True and TRUE are booleans, as are the corresponding false spellings.
Are dates converted to timestamps?
No. A plain date such as 2026-11-14 remains a string under this core-schema subset. No timezone conversion occurs.
Why reject duplicate keys?
A YAML mapping requires unique keys. JSON readers also disagree about duplicate object names, so this tool rejects them in either direction.
Will my large integer keep its digits?
Yes. The default string policy preserves its decimal digits and changes its JSON type explicitly. Exact-number mode preserves numeric text but cannot control the reader that consumes it.
Does this upload or save my configuration?
No. Pasted text and opened files are processed in the browser. There is no saved-content service, local history or input-sharing URL.

Sources

Last reviewed 2026-11-14. The method is written out above so you can check our math.