Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Convert basic YAML (maps, lists) into JSON.
{
"name": "Ada",
"age": 30,
"tags": [
"admin",
"dev"
]
}YAML is a popular human-readable configuration format (used by Docker Compose, GitHub Actions, Kubernetes, and many other tools) that relies on indentation to express structure. This tool converts a common, practical YAML subset -- nested maps, key: value pairs, and block sequences (- item) -- into JSON.
Paste YAML using standard indentation. The equivalent JSON structure appears instantly.
This covers YAML's most commonly used features: nested maps via indentation, scalar values (strings, numbers, booleans, null), and block-style sequences. It does not support YAML's flow style ({a: 1} / [1, 2]), anchors/aliases (&anchor/*alias), or multi-line block scalars (|/>) -- a full YAML spec implementation is far beyond what this quick-conversion tool covers.
name: Ada converts to {"name": "Ada", "tags": ["admin", "dev"]}.
tags:
- admin
- dev
For .ini-style config files instead, see the INI to JSON Converter.
Unlike an INI converter, this tool does interpret scalar values. After trimming, an empty value, a tilde or the word null becomes JSON null. The words true and false become booleans. A value made only of digits, with an optional leading minus sign, becomes an integer. Digits with a single decimal point become a floating-point number. A value wrapped entirely in double or single quotes has the quotes removed and stays a string, which is the way to force text that would otherwise be typed: writing a version like "1.20" in quotes keeps it a string, while an unquoted 1.20 becomes the number 1.2 and loses its trailing zero. Anything else stays a plain string.
Unquoted 30 becomes 30, unquoted true becomes true, "30" in quotes becomes the string 30.
Nesting is decided entirely by leading spaces. A key with no value on its line opens a child block made of the following lines that are indented deeper. Consistency matters: keep sibling keys at exactly the same indentation. If a line is indented differently from its siblings, it may be skipped or attached to the wrong parent, and the resulting JSON will look wrong even though no error appears. Use spaces rather than tabs, which YAML itself does not allow for indentation.
Suppose you write a top-level key called servers with two list entries, each beginning with a dash and each holding a name key and a port key. The converter treats each dash line that contains a colon as the start of a small map, gathers the more deeply indented lines below it as further keys of that same map, and produces a JSON array of two objects. A dash followed by a plain value, such as a tag name, produces an array element that is a scalar. Comment lines beginning with a hash and blank lines are removed before parsing.
Treat the output as a convenient conversion for simple configuration, not a full YAML validator. For production pipelines with anchors or multi-document files, use a complete YAML library.
No -- YAML's block scalar syntax (| for literal, > for folded) isn't supported; each value must be a single-line scalar, map, or sequence.
Likely because it uses a feature outside this tool's supported subset -- flow-style collections, anchors/aliases, or multi-line scalars are the most common culprits; simplify the YAML to this tool's supported subset first.
No -- lines starting with # are treated as comments and stripped before parsing, matching standard YAML comment syntax.
An unquoted value like 1.20 is read as a number and printed as 1.2. Wrap it in quotes in the YAML so it stays the string 1.20.
Flow style lists and maps are not supported, so the bracketed text is kept as an ordinary string. Rewrite the list with one dash per line.
No. JSON has no comments, and lines starting with a hash are discarded during parsing.
The parser expected a key and colon but found a line without a colon at that indentation level. Check for a missing colon or inconsistent indentation on the quoted line.
Reference: MDN Web Docs