Developer tools
Paste YAML on the left and get clean, formatted JSON on the right — instantly, as you type. Flip the direction to turn JSON back into YAML. Invalid input is flagged with the exact line that's broken.
YAML is a superset of JSON, so YAML → JSON is nearly always lossless. Going the other way, or writing YAML by hand, a few data types need care:
| YAML | Becomes in JSON | Notes |
|---|---|---|
key: value | "key": "value" | Mapping keys become strings. |
- item (list) | [ "item" ] | Sequences become arrays, order preserved. |
count: 42 | "count": 42 | Integers and floats stay numeric. |
enabled: true | "enabled": true | true/false, yes/no, on/off all parse as booleans in YAML 1.1 style parsers — this converter treats only true/false as booleans, matching YAML 1.2. |
empty: null or ~ | "empty": null | A key with no value at all also becomes null. |
when: 2026-10-20 | "when": "2026-10-20T00:00:00.000Z" | YAML timestamps parse as dates and serialize to ISO 8601 strings in JSON. |
# a comment | — dropped — | JSON has no comments. Converting JSON → YAML drops them permanently. |
Anchors &a / aliases *a | Expanded inline | JSON has no references, so aliased values are duplicated in the output. |
Multi-document (---) | Array of documents | Multiple YAML documents convert to a single JSON array. |
Most "my YAML won't parse" problems come down to one of these four.
YAML structure is defined by spaces — never tabs — and siblings must line up exactly. One stray space silently changes the nesting.
In YAML 1.1 parsers, unquoted NO, on, and y can be read as booleans — the country code NO famously becomes false. Quote values when in doubt.
An unquoted value containing : (colon + space) or starting with characters like *, &, {, or # will break or misparse. Wrap it in quotes.
version: 1.20 parses as the number 1.2, and 0123 may read as octal. Quote version numbers, ZIP codes, and IDs to keep them exact.
No. The conversion runs entirely in your browser using the open-source js-yaml library — nothing you paste or upload leaves your device. You can verify this by loading the page and disconnecting from the internet; the converter keeps working.
Yes — use the JSON → YAML toggle at the top of the tool. The YAML output uses block style (no flow braces), respects your indent setting, and can optionally sort keys alphabetically, which is handy for tidying Kubernetes manifests and CI configs.
The status bar shows the parser's error message with the line and column where it gave up. The usual causes are tab characters instead of spaces, misaligned indentation, a missing space after a colon, or an unquoted string containing a colon. Fix that line and the output updates automatically.
Yes. Files with several documents separated by --- (common in Kubernetes) convert to a JSON array containing each document in order. A single document converts to a plain JSON object.
JSON has no syntax for either. Comments are dropped, and anchors/aliases are expanded so the aliased value appears in full at each place it was referenced. The data itself is preserved.
Yes — every valid JSON document is also valid YAML. That's why pasting JSON into the YAML input also works here, and why JSON → YAML is always lossless for data (though never for comments).
This YAML to JSON converter turns YAML into clean, formatted JSON instantly, as you type. Paste YAML on the left and the formatted JSON appears on the right — no buttons, no waiting, no uploads. Flip the direction and it converts JSON back into YAML just as fast. Because YAML is a superset of JSON, the YAML-to-JSON direction is nearly always lossless; going the other way, comments are dropped permanently since JSON has no comments. Invalid input is flagged immediately with the exact line that’s broken, so you’re never guessing where a config file went wrong. The page also documents exactly what changes in the conversion — how mappings, sequences, booleans, timestamps, comments, and anchors are handled in each direction — and collects the YAML gotchas most likely to break a config.
The converter follows YAML 1.2 for booleans — only true and false count, so values like yes, no, on, and off stay as strings instead of silently becoming booleans the way older parsers treated them. YAML timestamps serialize to ISO 8601 strings, anchors and aliases are expanded inline, and multi-document YAML files are supported. Everything runs locally in your browser, so API keys and secrets in your configs never travel anywhere.
Need another in-browser utility? The image compressor shrinks images to an exact KB target the same way this page converts configs — no uploads, no sign-up. Find both among all free tools.
Paste or type YAML into the left pane and formatted JSON appears on the right instantly, as you type. A direction toggle flips the conversion so JSON becomes YAML. The whole thing runs locally in your browser — nothing is uploaded, stored, or sent to a server, which makes it safe for configs containing secrets.
When your input is invalid, the converter flags it immediately and names the exact line that is broken. Fix that line and the output updates live — there is no separate validate button or error log to dig through at all.
Yes. Conversion only succeeds on valid input, so a successful result is itself a validation pass — and failures point at the exact broken line. Multi-document YAML files are supported, and the YAML 1.2 boolean rules keep values like “on” and “yes” from silently becoming booleans.
Comments are dropped, because JSON has no comment syntax — converting JSON back to YAML will not bring them back, so keep your original if the comments matter. Anchors and aliases are expanded inline, since JSON has no reference mechanism; aliased values are simply duplicated in the output.