YAML to JSON

Convert YAML into valid, formatted JSON, right in your browser. Nothing is uploaded.

How YAML to JSON works

YAML is the human-friendly format that config files, CI pipelines, and container manifests are written in, using indentation instead of brackets. That readability is great for editing, but most code, APIs, and programming languages actually want JSON when it comes time to process the data. This tool reads YAML and converts it into valid, formatted JSON, so the file you comfortably maintain by hand becomes something a program can parse directly.

Paste your YAML and the tool interprets its indentation and lists, then emits the equivalent JSON with proper braces, brackets, and quotes. Indented key groups turn into objects, dash-prefixed lists turn into arrays, and the plain unquoted values YAML allows get the quoting JSON requires. The output is formatted so it is easy to read, and you can copy it straight into code or a tool that expects JSON.

Both formats hold the same data, so the conversion is faithful, but YAML has quirks that shape the result. Because indentation carries meaning in YAML, a file that is misaligned will not parse, and the error tends to point at the structure rather than a single character. YAML values like yes and no or dates may be read as booleans or specific types, so it is worth glancing at those fields in the JSON to confirm they came across the way you intended.

Use this instead of hand-writing JSON from a YAML file, which is slow and easy to get wrong, and instead of importing a YAML parsing library just to inspect one file. It is the quickest way to see a config as the structured data your code will actually receive.

It fits jobs like feeding a YAML config into a script or API that speaks JSON, debugging what a pipeline file really parses to, converting a settings file for a system that only accepts JSON, and checking that a hand-edited YAML file is structurally valid before you ship it. Developers working across config and code hit this need often.

Everything runs in your browser, so your YAML never leaves your device, there is no account to make, and the tool is free. The processing is local, which means the only genuine limit is your device's memory, and ordinary config files are nowhere near it.

Frequently asked questions

Why does my YAML fail to convert?

The most frequent cause is inconsistent indentation, since YAML uses spacing to define structure and a misaligned line or a stray tab breaks it. Fixing the indentation around the flagged area usually resolves it.

Can I use tabs to indent my YAML?

No, the YAML specification requires spaces for indentation and does not permit tabs. If your file was indented with tabs, converting them to spaces will let it parse.

Why did the word yes turn into true in the JSON?

YAML interprets yes, no, on, and off as boolean values by default, so they become true or false. If you meant them as the literal words, quote them in your YAML so they stay as strings.

Does it support multiple documents in one YAML file?

YAML can hold several documents separated by three dashes, but a single JSON output represents one structure. A multi-document file may need to be split, since JSON has no direct equivalent to that separator.

Are anchors and references expanded?

YAML anchors and aliases, which let you reuse a block, are resolved into their full values when converted, because JSON has no reference mechanism. The result is the expanded data with each reference filled in.

Will the JSON keep my keys in the same order?

Key order generally follows the order in your YAML. JSON objects do not formally guarantee order, but the output preserves your sequence so the file stays easy to compare against the source.

Related tools

Polished Pixels. All tools. About. Contact. Every tool runs in your browser and your files are never uploaded.