YAML to JSON Converter Online
- This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
YAML
Tab indents · Shift+Tab outdents · Esc then Tab moves on
JSON
Your JSON shows up here
Paste or type on the left, upload a file, or drop one onto the input.
JSON & data
- JSON to TypeScriptTypeScript interfaces from JSON
- JSON to ZodZod schemas from JSON samples
- JSON to YAMLConvert JSON to clean YAML
- JSON to CSV ConverterTurn a JSON array into a spreadsheet
- CSV to JSON ConverterTurn CSV rows into JSON objects
- JSON to XML ConverterTurn JSON into well-formed XML
- XML to JSON ConverterTurn XML into JSON, with attributes
About this tool
YAML is popular for configuration — Docker Compose, Kubernetes, GitHub Actions — while JSON is what most APIs and code expect. Paste YAML to get the equivalent JSON as you type.
Anchors and aliases are expanded, comments are dropped, and multi-document files separated by --- become a JSON array. Indentation mistakes are reported with the exact line and column. For instance, a tab used to indent a key gives “tab characters must not be used in indentation (line 2, column 1)”, and a key indented to the wrong level is flagged as bad indentation of a mapping entry.
Use the switch button to convert the other way; the current output becomes the new input. The 2 or 4 space setting controls the indentation of the output in both directions.
Check the types in the result. YAML 1.2 treats debug: no as the string "no", and port: 08 as the number 8, so quoted values stay strings and unquoted numbers become numbers. A value such as 1.10 becomes 1.1 because it is read as a number, so quote version strings you want to keep. The special merge key << is carried over as a literal key named << and not merged into its parent. Multi-document input is joined into an array, so a single file with two documents becomes a two-item JSON array. Parsing uses the js-yaml library in your browser and nothing is uploaded.
Frequently asked questions
Why does my YAML fail to parse?
The most common causes are tabs used for indentation (YAML requires spaces) and inconsistent indent levels under the same key.
Why did “no” or “on” become true/false?
This converter follows YAML 1.2, where only true/false are booleans. Older YAML 1.1 parsers treat yes/no/on/off as booleans too — quote such values to be safe.
Is my config uploaded?
No. Conversion happens in your browser, so secrets in config files stay local.
What happens to comments?
They are dropped, because JSON has no comments. If you convert back to YAML they will not return.
How are dates and numbers read?
Plain numbers become JSON numbers, and quoted values stay strings. A date such as 2026-01-15 comes out as the string "2026-01-15". Quote anything you need to remain text exactly as written, such as 1.10.