Developer Tools

YAML to JSON

Convert a YAML 1.2 document to JSON privately. Support mappings, sequences and core scalar types, preserve exact integers and review errors in a cancellable local worker.

Your content stays on your device Free, with no account
From YAML structure to JSON values Local worker · 5-second limit
One YAML 1.2 document, up to 100,000 UTF-16 units. Core scalar types, mappings and sequences are supported.

Aliases, merge keys, non-string keys, duplicate keys, custom tags and non-finite numbers are rejected. Quote values that must stay strings, such as IDs with leading zeros.

YOUR JSON

Ready. Paste one YAML 1.2 document.

Integer values stay exact. Decimal number source digits are retained where supported; notation is adapted to JSON. Comments, anchors and YAML formatting styles are not retained. JSON consumers may still round large numbers.

A FEW SIMPLE STEPS

How to use YAML to JSON

  1. Paste one YAML 1.2 document or load the example. Quote IDs and other values that must stay strings.
  2. Choose JSON indentation: two spaces, four spaces, tabs or minified output.
  3. Select Convert to JSON. Processing runs in a local worker; Cancel or edit a field to stop pending work.
  4. Review errors or converted JSON, then copy or download it. YAML comments and presentation formatting are not retained.
PRIVATE BY DESIGN

Why use this tool?

Your YAML stays on your device. The open-source yaml parser is self-hosted, and conversion runs locally without accounts, uploads or saved input history. A disposable worker supports cancellation and a time limit. JSON is generated from the parsed syntax tree without executing values or loading external resources.

Tool inputs stay in your browser. Only your theme preference is saved on this device.

A few things worth knowing

Which YAML features are supported?

One YAML 1.2 document using the core schema: string-keyed mappings, sequences, strings, booleans, null, integers and supported finite decimal numbers. Block and folded strings and flow collections are supported. Anchors without references may appear, but alias references and the reserved mapping key << are rejected. Empty or comment-only input is rejected; explicit null is supported. YAML 1.1 directives and multiple documents are not supported.

What is rejected instead of being silently converted?

Duplicate mapping keys, non-string or complex keys, aliases, merge keys, unsupported/custom tags and non-finite numbers are rejected. Standard core tags are accepted. Timestamp and binary tags are not resolved. Quote scalar keys that need to be strings. Resolve aliases and merged mappings into explicit values before conversion.

Will large numbers and decimals be rounded?

Integer values use BigInt while parsing and are emitted as exact JSON decimal numbers. YAML hexadecimal and octal integers normalize to decimal notation. Supported finite decimal numbers retain their source digits while plus signs, leading zeros and omitted digits around a decimal point are adapted to JSON syntax. Non-finite results, including overflowing decimal exponents, are rejected. Consumers of the output may still round large numbers. Quote values that must remain strings, especially leading-zero IDs.

What happens to dates, yes/no and comments?

YAML 1.2 core interpretation is used: plain yes/no and ordinary date-looking text remain strings; true/false and numeric forms are typed values. Comments, anchors, scalar quoting styles and other YAML presentation details are not represented in JSON. This is data conversion, not a YAML round-trip editor or application-schema validator.

What are the limits and cancellation behavior?

Input accepts 100,000 UTF-16 units. Traversal is limited to 20,000 nodes including mapping keys, 100 nested containers and 1,000,000 JSON output units. A five-second deadline includes module-worker startup and parsing. Cancel, field edits and page exit terminate pending work and ignore late results. Failed or timed-out runs expose no partial output. Use a current browser with module-worker support.

Which library is used, and does anything leave my device?

The self-hosted yaml 2.9.1 parser by Eemeli Aro is used under the ISC license. Its npm tarball integrity was verified, and its browser modules are copied unmodified with the license retained. No external requests, input storage, models or servers process your YAML. Copy and JSON downloads contain only the converted output. Clear keeps indentation; Example restores two spaces.