How do I use the YAML to JSON converter?
Paste your YAML into the left box and the JSON appears on the right as you type, formatted with two-space indentation. Switch the Direction menu to convert JSON back into YAML instead. The counters show input and output lines plus the root type (Object, Array or a scalar), and if something is wrong the message points at the problem, for example a tab used for indentation. Press Sample to load a document with nested objects, a list of maps, flow-style tags and a quoted value containing a colon, then use Copy result or Download to take the output away.
What is YAML?
YAML (YAML Ain't Markup Language) is a human-friendly data format used for configuration files in tools like Docker Compose, Kubernetes, GitHub Actions and many app frameworks. It uses indentation instead of braces to show structure, dashes for lists and "key: value" pairs for mappings, which makes it easy to read and edit by hand. It also supports comments, which JSON does not. The trade-off is that indentation mistakes are the most common source of errors, and tabs are forbidden.
YAML vs JSON: what is the difference?
Both describe the same kinds of data: objects, arrays, strings, numbers, booleans and null. JSON uses braces, brackets and quoted keys, which machines parse strictly and quickly, making it the standard for APIs. YAML drops most punctuation and relies on indentation, which people find easier to write and review, making it the standard for configuration. Because the data model matches, converting between them is lossless for ordinary documents, except that YAML comments have nowhere to go in JSON and are dropped.
What does the converter support?
Nested mappings at any depth, lists (including lists of objects), plain and quoted strings, integers, decimals and scientific notation, true/false booleans, null and empty values, flow-style collections such as [1, 2] and {x: 1, y: 2}, and comments anywhere in the document. In JSON to YAML mode it writes clean block-style YAML and quotes strings automatically when they would otherwise be misread, for example a value containing a colon. Document markers (--- and ...) are accepted and ignored.
What are the most common YAML mistakes?
Using tabs for indentation is the classic one; YAML requires spaces, and this converter flags the exact line. Inconsistent indentation is next: children of the same parent must line up exactly. Unquoted values containing ": " (a colon followed by a space) also break parsing, so wrap values like "use: with care" in quotes. Finally, remember that unquoted yes/no/on/off and numbers with leading zeros can be read differently by different parsers; quote anything that must stay a string.
Is it free and private?
Yes. The YAML to JSON converter is completely free, needs no sign-up, and runs entirely in your browser. Your documents are never uploaded to a server, which matters when configs contain internal hostnames or settings. It works on phones, tablets and desktop computers.