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).