YAML to JSON Converter
Reads the YAML that appears in real config files, and says when it meets syntax it will not guess at rather than quietly mis-reading it.
Runs entirely in your browser
Loading tool...
How to use
- Paste your YAML — a docker-compose file, a CI workflow, a Kubernetes manifest.
- Convert.
- Copy or download the JSON.
- If it reports unsupported syntax, the message names the feature and the line.
Features
- Mappings, sequences, block scalars, flow collections and multi-document streams.
- Follows the YAML 1.2 core schema, so a country code of no stays the string "no".
- Refuses anchors, aliases and custom tags by name instead of mis-reading them.
- Runs in your browser — a config file usually names your infrastructure, and it is never uploaded.
Frequently asked questions
- Why is my anchor rejected instead of converted?
- Because an anchor and its alias are a reference, and resolving them wrongly produces a file that looks right and deploys something else. This parser covers the YAML people write by hand in configuration files; anchors, aliases and custom tags fall outside that, so they are named and refused rather than approximated. Expand them in your editor first, or run the file through a full YAML implementation.
- Why did no stay a string instead of becoming false?
- Because YAML 1.2 says so, and the older behaviour is a well-known bug factory. Under YAML 1.1, the country code for Norway — NO — parsed as the boolean false, which is why the problem has a name. This converter follows the 1.2 core schema, where only true and false are booleans and yes, no, on and off are ordinary strings.
- What happens to a file with several documents?
- A YAML stream can hold many documents separated by ---, and JSON holds exactly one value. So a single document converts to an object and a multi-document stream converts to an array of them, which keeps every document rather than silently dropping all but the first.
Related tools
Convert configuration to YAML with the strings that would change meaning quoted — including the country code that loads as false.
Format and beautify JSON instantly.
Find JSON syntax errors and see exactly where they are.