YAML to JSON
Convert supported YAML structures to JSON and review their value types.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Convert supported YAML mappings, sequences and scalar values into formatted JSON. This reader handles a limited subset of YAML. Check the inferred types and your application's requirements before using the result.
How to use this tool
- Paste YAML into “YAML input” or choose a UTF-8 file. A selected file takes priority; remove it to convert pasted text instead.
- Check your input, then select “Convert to JSON”.
- Check the JSON structure and value types, then use Copy result or download document.json.
Supported inputs and limits
Paste up to 1 MiB of UTF-8 text or select one UTF-8 file up to 1 MiB. Filenames are limited to 512 UTF-16 code units. Clear oversized pasted text even when using a file.
The reader checks nesting depth against 128. Block mappings and sequences share a limit of 200,000 entries and items; flow collections do not use that block counter.
Supported forms include block and flow mappings and sequences, quoted or plain values, and | or > block strings. Tags, anchors, aliases, bare block << merge syntax and multiple documents are outside this subset. A quoted << key, or << in a flow mapping, is an ordinary name and never merges data. Application settings are not validated.
Worked example
Example input
id: 9007199254740993 name: "中文" ok: true
Example options
{}Example output
{
"id": 9007199254740993,
"name": "中文",
"ok": true
}When something does not work
Check YAML indentation, quotes and unique mapping keys. Simplify unsupported constructs, then run again. For a file error, reselect a UTF-8 copy or remove the file and paste its text.
Frequently asked questions
Are my files uploaded?
No. Conversion runs locally in your browser. Moving between pages may retain a bounded temporary workspace in the same tab. Refreshing or closing the tab clears it, so copy or download any result you want to keep.
Can conversion change how my values are written?
Yes. Comments and YAML layout are discarded, while unquoted values may become JSON numbers, booleans or null. Quote values such as "001" when they should remain strings. Number spelling is normalized: .5 becomes 0.5, and supported hexadecimal or octal integers become decimal. The converter does not round large integers, but another app may when reading the JSON.
How do I save the complete JSON?
The preview and Copy result contain the complete JSON. Download document.json for a UTF-8 file with two-space indentation and no added line break at the end. YAML comments and layout are not included.
Documentation & further reading
Related tools
CSV to JSON
Convert CSV or TSV to a JSON array of objects while keeping every cell as a string.
JSON to CSV
Turn an array of JSON records into a CSV table.
View CSV
A clear look at your data, no spreadsheet app needed.
Clean CSV
Remove duplicate rows by the columns you choose, with optional empty-row removal.