Free YAML ↔ JSON converter

Switch direction with one click, paste a config or API payload, and get formatted output. Parsing uses a modern YAML 1.2–compatible engine; nothing is uploaded or stored on a server.

Loading…

How to use this tool

  1. 1

    Open YAML / JSON converter

    Use it for this task: YAML <-> JSON conversion, pretty-print, copy-ready output - 100% in-browser.

  2. 2

    Paste or upload the source content

    Put the original text or file in the input area, then choose the conversion or formatting options.

  3. 3

    Copy or download the converted result

    Check the preview first, then copy the output or download the generated file.

Quick facts

Runs offline?Yes — parsing runs fully in this tab using the `yaml` npm package in your browser.
YAML version?The parser follows YAML 1.2–compatible rules (via the `yaml` library) — good for typical configs; exotic edge cases may differ from every offline CLI.
Comments & multiple documents?Single-document flows work best. Comments in YAML are ignored when converted to JSON; for multiple YAML documents, split them manually first.
Privacy?No network — your text never leaves the device for this tool.

Top use cases

  1. YAML <-> JSON conversion, pretty-print, copy-ready output - 100% in-browser.
  2. Runs offline?: Yes — parsing runs fully in this tab using the `yaml` npm package in your browser.
  3. YAML version?: The parser follows YAML 1.2–compatible rules (via the `yaml` library) — good for typical configs; exotic edge cases may differ from every offline CLI.
  4. Comments & multiple documents?: Single-document flows work best. Comments in YAML are ignored when converted to JSON; for multiple YAML documents, split them manually first.
  5. Privacy?: No network — your text never leaves the device for this tool.

FAQ

When should I use YAML vs JSON?

YAML is often used for config files and Kubernetes because it is human-readable and supports comments. JSON is the lingua franca of web APIs. This tool helps you move between the two while formatting results.

Will anchors, tags, and custom types round-trip perfectly?

Round-trips go through JSON values: anything that cannot be represented in JSON (e.g. some YAML tags) will be lost or transformed. Use this for structurally compatible data.

Why is my huge file slow?

Very large pastes are parsed synchronously in the browser. For multi-megabyte files, consider a local CLI; for normal configs, this page should feel instant.

Is my data sent to Safe Local Tools servers?

No. The site is static; conversion runs in your browser. Clear the page or refresh to discard the text.

Can I use JSON with trailing commas?

Standard JSON.parse does not allow trailing commas. Remove them or fix the JSON before converting to YAML.

What about JSON5 or other supersets?

Only strict JSON (ECMA-404) is accepted in JSON → YAML mode. For JSON5 or other dialects, normalize to JSON first with another tool.