YAML to JSON
Convert YAML config to JSON and back, with clear errors when it will not parse.
Convert Between YAML and JSON
YAML and JSON describe the same data with very different priorities. YAML is written by people and reads well; JSON is consumed by programs and parses unambiguously. Moving between them is a routine part of working with any modern configuration.
The awkward part is that YAML is a genuinely large specification and almost nobody uses all of it. This handles the subset that appears in real config files, and reports what it does not support instead of guessing — a converter that silently mis-parses a config is worse than one that refuses it.
Key features
- Both directions — YAML to JSON and JSON to YAML, with the result carried across when you switch.
- The syntax people actually write — nested maps and lists, comments, quoted and plain scalars, multi-line blocks with
|and>, and anchors. - Line-numbered errors — where the parse failed, not just that it did.
- Correct scalar typing —
true,null,~and numbers become real JSON types, not strings. - Quotes only where needed — the YAML output quotes a string only when leaving it bare would change its meaning.
This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.
How to use: YAML to JSON
- Choose a direction
YAML → JSON, or JSON → YAML. - Paste your config
Or load the sample to see the shape of what is supported. - Read the result
Or the error, which names the line that stopped it. - Copy it
Switching direction carries the result across, so a round trip is one click.
Technical specifications
| Processing location | Entirely in your browser — no server round trip |
|---|---|
| Data uploaded | None. Files and text never leave your device |
| Price | Free — no account, no trial, no usage cap |
| Category | Converters |
| Works offline | Yes, once the page has loaded |
| Browser support | Chrome 90+, Edge 90+, Firefox 90+, Safari 15+ |
| Interface languages | English, 中文, हिन्दी, Español, العربية |
Frequently asked questions
Which parts of YAML are not supported?
Explicit tags such as <code>!!binary</code>, merge keys (<code><<:</code>), multiple documents in one stream, and complex flow-style nesting. Each is reported rather than mis-parsed. Everything that appears in a typical Docker Compose or CI config is handled.
Why did my YAML fail on indentation?
YAML takes indentation as structure, and a tab is not a space. Most YAML failures are a tab that slipped in from an editor, or a list indented inconsistently with its neighbours.
Does the conversion keep my comments?
No — JSON has no comment syntax, so comments are read and discarded. Converting JSON back to YAML cannot restore them, which is worth knowing before you round-trip a heavily commented config.
Is my config uploaded?
No. It is parsed in the page as you type. That matters, because config files routinely carry hostnames, bucket names and occasionally a secret someone forgot to move out.