YAML and JSON converter

Convert YAML 1.2 Core to JSON or JSON to YAML. Choose one document or an array of documents.

  • Runs in your browser
  • No upload
  • Check before download

Inputs stay in this tab and are not uploaded or saved automatically. Optional aggregate usage counts and coarse processing diagnostics are sent only after consent, without input content or filenames. Clearing or closing loses inputs; save needed outputs first.

Formats and limits

Convert YAML 1.2 Core to JSON or JSON to YAML. Choose one document or an array of documents. Comments, scalar style, explicit tags, aliases, non-finite numbers and large integers are diagnosed. Unknown tags, cyclic graphs, colliding converted keys and more than 20 alias expansions are rejected; no constructors run. Float representation is binary64; nonfinite values become strings, not JSON null. Scalar mapping keys become JSON property names, and a report lists any key types that were lost. Integer keys keep their exact decimal spelling, including large integers. If two converted names collide, the conversion is rejected as a loss. Complex keys are still not supported.

UTF-8 only. Input up to 1 MiB; XML up to 100,000 UTF-16 units and depth 64; JSON up to 20,000 nodes. JSON Lines up to 16 MiB, 100,000 records and 1 MiB per value. Output up to 32 MiB. Queries run for up to 3 seconds and other jobs for up to 10 seconds in a worker you can cancel. XSD native memory is limited to 64 MiB; this is not the whole worker or DOM heap.

How to use it

  1. Choose the source and mode

    Paste YAML or UTF-8 JSON and select the conversion direction. For YAML, choose a single document or an array of documents, and choose whether information lost in conversion is reported or causes the conversion to be rejected.

  2. Configure the domain parameters

    Load the example: name: Refentra and items: [1, true, null] become JSON with name as a string and items as an array. The comment in the source is reported as lost, because it is not a JSON field.

  3. Inspect diagnostics and download

    Check the types and the loss diagnostics before you download the JSON or YAML. When YAML has several documents separated by ---, array mode keeps each document as an array entry, while single mode refuses multiple documents.

Formats and limits

Why is this input rejected or empty?

An unknown tag, a cyclic alias graph or a converted key that collides with another is rejected. Report mode doesn't make those inputs safe to convert. If reject-loss is selected, even a valid document with comments may stop the conversion.

Which parser profile and limits apply?

YAML 1.2 Core only; arbitrary executable tags are not supported. Comments, style and aliases are not kept as YAML presentation in the JSON. Input is limited to 1 MiB and alias expansion to 20. Check the numeric and tag diagnostics instead of assuming a byte-exact round trip.

Are inputs or referenced files sent to a server?

Parsing runs locally in a browser worker. URLs inside the input are not used to fetch remote documents. Supply any schema dependencies the tool supports as local files, keep your source file separately, and download the results before you close the page.