YAML ↔ JSON Converter
Convert YAML to JSON and JSON back to YAML, with real parsing rather than guesswork — nothing you paste is uploaded.
The first conversion downloads a 39 KB YAML parser from jsDelivr. Your text is never uploaded — the parsing happens in this tab.
🔒 Runs entirely in your browser — nothing you type is uploaded or stored on a server.
This converter turns YAML into JSON and JSON back into YAML. It matters that it uses a real parser: YAML looks simple until you meet anchors and aliases, block scalars, flow collections, multi-document streams and implicit typing. A hand-rolled parser gets those quietly wrong, and quietly wrong is the worst outcome when the file is a Kubernetes manifest or a CI pipeline.
Also on Txtset: format and validate the JSON you get out · do the same thing with XML.
So the first time you press Convert, the page downloads js-yaml 4.1.0 (39 KB) from a CDN, pinned to an exact version and checked with Subresource Integrity so a tampered file cannot run. That is the only network request this tool makes. Your text is never uploaded — the parsing happens in this tab, and once the parser is cached the page works offline.
One behaviour worth knowing before you trust the output, because tools disagree about it. This follows YAML 1.2 core, so no, yes, on and off stay strings and only true/false become booleans. Older YAML 1.1 tools turn no into false — which is how the famous “Norway problem” ate a country code. If you need no to be a boolean, write false.
Going the other way, long strings are never hard-wrapped and anchors are never invented for you, because both of those surprise people who then have to explain the diff. Keys can be sorted alphabetically, which makes two generated files comparable in a review.
How to use
- Pick a direction — YAML → JSON or JSON → YAML.
- Paste your document into the input box.
- Choose an indent width, and tick Sort keys if you want a stable, comparable ordering.
- Press Convert. The first press downloads the parser; every press after that is instant.
- Copy the result or download it as a file.
Examples
name: my-app
replicas: 3
ports:
- 8080 becomes {"name": "my-app", "replicas": 3, "ports": [8080]}country: no converts to {"country": "no"} — a string, not false, because this follows YAML 1.2.Two documents separated by
--- convert to a JSON array of two objects.Frequently asked questions
Is my YAML uploaded anywhere?
Why does it download a library at all?
Does <code>no</code> become <code>false</code>?
true and false are booleans, so no, yes, on and off stay strings. YAML 1.1 tools behave differently — that difference is the origin of the “Norway problem”, where the country code NO silently became a boolean.Can it handle multiple documents in one file?
--- converts to a JSON array, one entry per document. A single document converts to a single object.