YAML to JSON
Paste YAML or drop a file. Ctrl+C copies the result.
How to convert YAML and JSON
Paste or open
Paste YAML into the Input pane, press Open to pick a .yaml or .yml file, or drop it onto the pane. For the other direction, use the JSON to YAML tab and paste JSON.
Set the options
Choose the indent, tick Sort keys to order keys alphabetically, or Minify for one-line JSON. The output updates as you type, and a mistake shows its line and column.
Copy or download
Press Copy, or Ctrl+C with nothing selected, to copy the whole result. Download saves data.json or data.yaml.
Good to know
- JavaScript-style JSON with unquoted keys, single quotes, trailing commas or comments is repaired before conversion.
- Files over 2 MB stay out of the editor and are read by the worker straight from disk, so large exports and Kubernetes manifests convert without freezing.
- Dates such as 2026-09-27 stay as strings in JSON; YAML timestamps are not turned into Date objects.
- Only the first 1 MB of the result is drawn on screen. Copy and Download always use the full output.
Questions people ask
What happens to comments and anchors?
JSON has no comments, so they are dropped. Anchors (&name) and aliases (*name) are resolved, so the JSON contains the full value everywhere the alias was used. Merge keys (<<) are applied too.
My YAML file has several documents separated by ---. What do I get?
A JSON array with one item per document, in order. A single document gives the value itself, not an array.
Why does 'yes' or '012' come out differently from what I expected?
The converter follows YAML 1.2, where only true and false are booleans and a leading zero does not make a number octal. If you need a string, quote it in the YAML.
Does JSON to YAML keep the key order?
Yes, unless you tick Sort keys. Long strings are written on one line rather than folded, so the YAML stays easy to diff.
Is my file uploaded?
No. Parsing and conversion run in a web worker inside your browser. Nothing is sent to a server.