JSON to YAML
Convert JSON to YAML with quoted strings and unchanged number tokens.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Paste JSON or select a UTF-8 file to convert objects, arrays or individual values. The converter uses a fixed two-space layout and double-quotes keys and strings, so values such as "true" stay strings. JSON number tokens keep their original spelling.
How to use this tool
- Paste JSON into “JSON input” or choose a local UTF-8 file. A selected file takes priority; remove it to convert the pasted text.
- Check your input, then select “Convert to YAML”.
- Review the YAML, then select “Copy result” or download document.yaml.
Supported inputs and limits
Paste up to 1 MiB of UTF-8 JSON or choose one UTF-8 file up to 1 MiB. Filenames can contain at most 512 UTF-16 code units. Clear oversized pasted text even when using a file.
JSON may contain at most 200,000 values and reach a nesting depth of 128, with the root at depth zero. Each object needs unique keys after JSON escapes are decoded.
Output uses a fixed YAML subset with two-space indentation. It does not generate tags, anchors or aliases, or check the configuration rules of the application that will read it.
Worked example
Example input
{"id":9007199254740993,"name":"中文","ok":true}Example options
{}Example output
"id": 9007199254740993 "name": "中文" "ok": true
When something does not work
Fix the reported JSON or choose an accessible UTF-8 file, then run the conversion again. For duplicate keys, check their decoded names within each object. If the local converter cannot load, copy your input before reloading.
Frequently asked questions
Are my files uploaded?
No. Conversion runs in your browser, and your original file stays unchanged. The workspace can keep inputs temporarily while you switch tools in the same tab, within its memory limits. Download anything you need to keep; refreshing or closing the tab clears the workspace.
How are strings and numbers handled?
Keys and string values are double-quoted, while arrays and object entries keep their input order. JSON number tokens, including large integers, keep their original spelling. The application that reads the YAML may use different numeric precision or require a particular configuration structure.
Can I copy or download the complete YAML?
Yes. The result view and “Copy result” contain the complete YAML text. Download saves it as the UTF-8 file document.yaml, including its final line break.
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.