JSON to YAML & YAML to JSON

Convert between JSON and YAML instantly — in your browser, nothing uploaded.

Paste JSON or YAML, pick a direction, and get the other format back immediately. YAML is friendlier for config files and CI pipelines; JSON is the lingua franca of APIs. This converter round-trips between them losslessly (apart from YAML comments, which JSON can’t represent). Like every JSONNeat tool it runs locally.



When to use YAML instead of JSON

YAML wins anywhere a human edits the file by hand: Kubernetes manifests, GitHub Actions workflows, Docker Compose, Ansible playbooks, and most application config. It supports comments, multi-line strings and references, and the indentation-based syntax is less noisy than nested braces. JSON wins on the wire — it’s what REST and GraphQL APIs speak, it parses faster, and every language ships a parser in its standard library.

What changes in a round-trip

Converting JSON → YAML → JSON returns identical data. Going YAML → JSON drops comments (JSON has none) and resolves anchors/aliases into concrete values. Watch out for YAML’s type inference: an unquoted yes, no, on or off can become a boolean, and 1.0 becomes a number. Quote the scalar in YAML if you need it to stay a string.

Privacy

Everything runs in your browser. Your data never leaves the tab — the same guarantee that applies to the formatter, validator and viewer.

Frequently asked questions

What is the difference between JSON and YAML?
They represent the same data model — objects, arrays, strings, numbers, booleans and null — but YAML uses indentation instead of braces and brackets, allows comments, and is generally easier for humans to hand-edit. JSON is stricter and faster for machines to parse. Any JSON document is also valid YAML, but not every YAML document is valid JSON.
Is my data uploaded?
No. The conversion runs entirely in your browser. Your JSON or YAML is never sent to a server, logged or stored — safe for config files, secrets templates and private API payloads.
Does YAML to JSON preserve comments?
No. JSON has no comment syntax, so YAML comments (# like this) are dropped during conversion. This is a limitation of JSON itself, not the converter.
How are YAML anchors and aliases handled?
They are resolved: the converter expands anchors (&name) and aliases (*name) into the concrete values they reference, because JSON has no equivalent reference mechanism.
Which YAML version is supported?
YAML 1.2 / JSON-compatible loading via the js-yaml library. Unsafe custom tags are not executed — only standard scalar, sequence and mapping types are converted.
Why did my YAML number become a string (or vice versa)?
YAML infers types from unquoted scalars: 1.0 is a number, "1.0" is a string, yes/no/on/off can be booleans. If a value converts to the wrong type, quote it in YAML to force a string.