MSRX Tools

YAML to JSON

Turn YAML config into JSON, with clear parse errors.

Everything runs inside your browser. Your files never leave your device.

Input

Result

The result appears here as you type.

Ask about YAML to JSON

Questions about what this tool does, which option to pick, or what it can and cannot handle.

This is the one part of the site that uses a server. The question you type here is sent to an AI provider to be answered — your files and whatever you put in the tool above are not, and the assistant cannot see them. Answers are generated and can be wrong; the tool itself is not guessing.

About the YAML to JSON

Going from YAML to JSON is usually about feeding a config file to something that only speaks JSON: a validator, a diff tool, a script, an API that will not accept anything else. It is also the fastest way to find out what your YAML actually means, because the JSON output shows you the values your parser will see rather than the ones you assumed you wrote.

That second use is the interesting one. YAML has more ways to be subtly wrong than any format in common use. Indentation that mixes tabs and spaces, a colon inside an unquoted value, a multi-line block that folds when you wanted it to preserve newlines, a bare “no” that becomes “false” — all of these are legal YAML that means something other than what was intended. Converting to JSON makes the interpretation explicit: if a value comes out as “false” rather than “"no"”, you have found your bug.

Parse errors are reported on their own line, trimmed of the multi-line diagnostic that YAML libraries tend to produce, so the message stays readable.

The document never leaves your browser, which matters more here than usual — YAML files are where people keep secrets, connection strings and deployment credentials.

How to use it

  1. 1Paste your YAML configuration into the input box.
  2. 2Read the JSON result below and check that the values are the types you expected.
  3. 3Choose indentation, or pick “Minified” if the JSON is going into a request body.
  4. 4Copy the result or download it as a .json file.

Questions

Why did my value become true or false?
YAML reads unquoted yes, no, on, off, y and n as booleans. If you meant the two-letter string, quote it in the source. Seeing the conversion is exactly how this class of bug gets caught.
Can it handle multiple documents in one file?
Only the first document is converted. A file separated by --- markers holds several documents, and JSON has no equivalent for that — split them and convert each in turn.
Are YAML anchors and aliases supported?
Yes. Anchors are resolved during parsing, so the JSON output contains the expanded value wherever the alias appeared.
My YAML is valid but the tool rejects it.
Check for tab characters used as indentation — YAML forbids them outright, and they are invisible in most editors. The reported error line is a good place to start looking.