YAML ↔ JSON Converter
Convert YAML to JSON or JSON to YAML — either direction, with your choice of indentation — without anything leaving your browser. It validates as it converts, so a syntax slip shows you the line and column.
Nothing saved yet. Your recent inputs appear here — stored only in this browser, never uploaded.
Your data never leaves your browser
This tool runs entirely in your browser. There is no upload endpoint on this page — your input is processed locally with native browser APIs, and nothing is sent to a server or logged. Open your browser's network panel and check: the only request is the page itself.
How it works
Three steps, no surprises
Pick a direction
Choose YAML → JSON or JSON → YAML. The panes relabel themselves so it is always clear which side is which.
Paste your input
Drop in your YAML or JSON. It converts the moment you stop typing, and a syntax error points you to the line and column. Set indent to 2 or 4 spaces.
Copy, download or share
Copy the result, download it as a .json or .yaml file, or grab a share link that carries the input in the URL — never on a server. Swap to round-trip it back.
FAQ
YAML ↔ JSON questions, answered
What does this YAML ↔ JSON converter do?
It converts between the two formats in either direction: paste YAML and get JSON, or paste JSON and get YAML. Flip the direction with one toggle. It is handy when a tool wants one format but you have the other — for example turning a tidy YAML config into the JSON an API expects, or turning a block of JSON into YAML that is friendlier to read and edit. The conversion happens as you type.
Is the conversion lossless — will I get back exactly what I put in?
The data is preserved — every key, value, list and nested structure comes across intact, and the order of keys is kept. Two things do not survive a round trip, because JSON simply has no equivalent: comments (the # lines in YAML) are dropped, and YAML anchors and aliases are expanded into the full data they stand for rather than kept as references. So the meaning of your document is identical; only YAML-only conveniences that JSON cannot represent are lost.
Why would I convert between YAML and JSON?
They describe the same kind of data, but suit different jobs. YAML is built for humans — it is the usual choice for configuration: CI pipelines, Docker Compose, Kubernetes and app settings, where comments and a clean layout matter. JSON is built for machines — it is what most APIs send and receive, and what many programs parse fastest. Converting lets you author in whichever is comfortable and hand over whichever the next tool requires.
Does it check that my input is valid?
Yes — it has to parse the input before it can convert it, so a syntax mistake is caught and reported with the line and column where parsing failed. That makes it a quick sanity check as well as a converter: if your YAML indentation is off or your JSON has a stray comma, you will see exactly where. It checks structure and syntax only — it does not know whether the values are the ones you meant.
Can it convert a YAML file with several documents?
It converts a single document at a time, which covers the overwhelming majority of config files. YAML lets you put several documents in one file separated by ---, and that multi-document form is not converted here; if you paste one you will see a parse error rather than a wrong result. Split the documents and convert them one by one. JSON has no multi-document concept, so the JSON-to-YAML direction always produces a single document.
Is my data uploaded anywhere?
No. Both directions are parsed and converted entirely in your browser — nothing you paste is sent to a server, which you can confirm in your browser’s network panel. That matters because YAML and JSON config so often holds hostnames, environment values, keys and other details you would not want to send to a third party. The optional share link keeps the input in the URL itself rather than on a server, and the on-device history can be cleared whenever you like.
Other free developer tools
Every one runs in your browser. No signup, no upload, no ads.
Need help with your website's SEO?
Book a free consultation with our London team.
Book a Free Consultation