YAML and JSON converter

Convert a limited YAML 1.2 subset and JSON locally, preserving exact numeric lexemes and rejecting unsupported structures instead of silently losing data.

Processing stays in your browser without uploads or automatic saving. File reading has its own 5-second deadline, followed by one cancellable worker with a 5-second conversion deadline. Links are not opened and content is not executed.

Input up to 256 KiB of UTF-8; output up to 2 MiB. Depth 32, 500 pairs per map, 30,000 CST or AST nodes and 120,000 lexemes. Decoded strings: 65,536 UTF-16 units; number lexemes: 1,024 characters. These are not bounds on total browser memory.

A limited YAML 1.2 subset: unique string keys, sequences, maps and JSON values. Anchors, aliases, explicit tags, directives, merges, multiple documents, non-string keys, NaN and Infinity are rejected. Use explicit maps inside sequences, such as [{a: b}].

Large, decimal and exponent JSON number lexemes stay exact without conversion to Number, including -0 and 1e400. Supported YAML numeric forms are normalized textually; unsigned hex/octal uses BigInt. Plain yes, on and dates remain strings; YAML 1.1 rules are not enabled.

How to use

Choose conversion direction and input source. Paste text or select a local UTF-8 file, then convert and review the preview and style-loss notice. Explicitly copy the complete result or download converted.json or converted.yaml. Oversized text or a file that could not be read stays rejected until that same input is corrected; editing another option does not process an old value. Reading and conversion can be cancelled; the original file stays unchanged.

Try an example

YAML n: 9007199254740993 produces JSON retaining that exact number. JSON {"n":1e400,"name":"Arabic"} produces YAML retaining 1e400 without Infinity. .5 becomes 0.5 and 0o10 becomes 8, while yes and the date 2026-09-25 remain strings.

Support & limits

Values, map/sequence order and JSON-grammar number lexemes are retained without Number conversion; supported YAML numeric forms are normalized textually and unsigned hex/octal uses BigInt. No YAML 1.1 or preservation of comments/styles/quotes/source line endings; output is UTF-8 without BOM and with final LF. Aliases, anchors, explicit tags including !!str, directives, multiple documents, merges, non-string/duplicate keys, NaN/Infinity and shorthand flow pairs such as [a: b] are rejected. Use explicit maps. Files require valid UTF-8; input BOM is retained and accepted initially by YAML but rejected by JSON. Preview is text only and may end inside a combined character; clipboard line endings may vary by system. Nothing is uploaded, saved, executed or followed as a link.

Common questions

Does the converter support all YAML or automatically repair documents?

No. It converts the declared YAML 1.2 subset representable by JSON values and rejects unsupported or over-budget input. Conversion is not sanitization or schema validation, and does not guarantee that another application reads large numbers without rounding. Bounded processing does not guarantee a total browser-memory ceiling.

Related tools