JSON YAML Converter

Convert JSON to YAML and YAML back to JSON in the browser.

  • Runs locally in your browser
  • No upload required

Try it

Paste JSON or YAML. It is converted in your browser and never uploaded.

Result
name: gampangin tags: - json
name: gampangin
tags:
  - json

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Converted 43 characters from json to yaml.

How it works

  • Parsed the input with the pure in-browser engine.
  • Applied YAML 1.2 block-style output or core-schema input typing.
  • Collected an explicit warning for every lossy transformation.
  • The conversion produced 0 warning(s); warnings are shown before the result.

Methodology

  1. Parse JSON with the F054 verbatim scanner, or YAML with the F056 block/flow parser.
  2. Emit JSON to YAML as 2-space block style, quoting scalars that would be misread.
  3. Resolve YAML plain scalars with the YAML 1.2 core schema and report lossy steps.

Usage

  1. Choose JSON to YAML or YAML to JSON.
  2. Paste the document.
  3. Run the tool; read any warnings before copying the result.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

JSON to YAML

jsonSelect to copy
{
  "text": "{\"name\":\"gampangin\",\"tags\":[\"json\",\"yaml\"]}",
  "direction": "json-to-yaml"
}

YAML to JSON

jsonSelect to copy
{
  "text": "name: gampangin\ntags:\n  - json\n  - yaml",
  "direction": "yaml-to-json"
}

Limitations

YAML scalar typing

On input, plain scalars are resolved with the YAML 1.2 core schema: null, booleans, integers and floats become JSON values, and quoted scalars stay strings.

Frequently asked questions

Which YAML version is used?
Block-style output and YAML 1.2 core-schema scalar typing on input; anchors, aliases, tags and multiple documents are rejected.
Does JSON to YAML round-trip exactly?
For JSON-compatible documents it does; scalars that YAML cannot represent as JSON text are reported as warnings.
Is my data uploaded?
No. The conversion runs entirely in your browser and is never sent anywhere.

Sources

  1. YAML 1.2.2 Specification — YAML Language Development Team
  2. RFC 8259 — The JavaScript Object Notation (JSON) Data Interchange Format — IETF