How to convert between YAML and JSON
Configuration is usually written in YAML because people read it, while programs exchange JSON. This converter bridges the two: paste a Docker Compose or GitHub Actions snippet to feed an API, or turn a JSON response back into a config file. Pick a direction, paste the text, and everything is converted in your browser - nothing is uploaded.
The supported subset is stated up front. Built without any external library, this tool does not implement the full YAML specification. It handles keys and values, sequences, nesting by space indentation, strings, numbers, booleans and null, quoted strings and hash comments. Anchors and aliases, multi-document files, block scalars, flow style with brackets or braces, tags and tab indentation are not supported, and each one is reported as an error with the line number rather than silently mis-converted.
The words yes and no are kept as strings rather than booleans, because YAML versions disagree about them and a silent change would flip your configuration. JSON cannot carry comments, so the result tells you how many were dropped. Going from JSON to YAML, the output uses two-space indentation and quotes any string that would otherwise read as a number, a boolean or null.
Frequently asked questions
The parser hit a construct it does not support and points at the line. Block scalars, anchors and flow style are the usual causes; rewrite that part as a plain key-value pair or a list and it converts.
JSON has no comment syntax, so they are dropped during conversion. The result notes how many were removed, so keep the original YAML if the comments matter to you.