YAML to JSON Converter

Turn YAML into JSON — mappings become objects, sequences become arrays, scalars keep their type. Pretty-print or minify, then copy or download. Runs in your browser; nothing is uploaded.

How to Convert YAML to JSON

Three steps, all in your browser.

1

Paste or load your YAML

Paste YAML text into the box, or click “Load .yaml file” to open a config file. The tool converts as you type — no button to press.

2

Choose the output style

Leave it pretty-printed for easy reading, or turn on Minify JSON for the smallest valid string. Need the reverse? Use the JSON to YAML Converter.

3

Copy or download

The JSON appears in the output box. Hit Copy JSON to send it to your clipboard, or Download .json to save a file. Nothing is uploaded — it all happens on your device.

Frequently Asked Questions

How do I convert YAML to JSON?
Paste your YAML into the input box, or load a .yaml or .yml file. The tool converts it to JSON instantly as you type. Mappings become objects, sequences become arrays, and scalars keep their type. Choose pretty-printed or minified output, then click Copy JSON or Download .json.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser with JavaScript. The YAML you paste or the file you load is parsed on your own device and is never sent to a server, logged, or stored. That means you can safely convert private config, secrets templates, or internal data, and the tool keeps working offline once the page has loaded. Closing or refreshing the tab clears everything.
Does it support comments and multi-line strings?
Yes. YAML comments starting with # are ignored during parsing, and block scalars written with | or > are read as multi-line strings. Because JSON has no concept of comments, they do not appear in the output — only the actual data does. Anchors and aliases are resolved to their referenced values so the JSON is fully expanded.
What is the difference between pretty and minified output?
Pretty-printed JSON is indented with two spaces so it is easy to read and review. Minified JSON strips all optional whitespace to produce the smallest valid string, which is better for sending over a network or embedding in code. Both represent exactly the same data — tick Minify to switch, and the output updates immediately.
What if my YAML is invalid?
The tool validates the YAML as you type and shows the parser's message, including the line and column where the problem was found — for example inconsistent indentation or a tab character, which YAML does not allow. Fix the reported issue and the JSON appears right away.