JSON to YAML Converter
FromTo
JSON to YAML converter — also XML and TOML
Convert JSON to YAML and YAML to JSON in your browser, plus XML and TOML on the same page. Toolshelf does not upload the document.
Convert vs format
Need pretty JSON only? Use the JSON formatter. Need a table? Use JSON to CSV.
JSON to YAML FAQ
- What is the difference between YAML and JSON?
- JSON is stricter (quoted keys, no comments). YAML allows comments and indentation. Converting YAML to JSON drops comments. Both stay in this browser.
- How are XML attributes represented?
- Attributes become keys prefixed with @, so <item id="1"/> becomes { item: { "@id": "1" } }. JSON keys must be valid XML names or conversion fails.
- How does TOML compare to JSON?
- TOML needs an object at the root (not an array). Dates stringify as TOML datetimes or JSON strings depending on the parser.
- Does converting pretty-print my JSON?
- This page converts between languages. To only indent or minify JSON, use the JSON formatter. Same-language pretty-print is disabled here.
- Is my data uploaded?
- No. Toolshelf parses and emits in the browser. A draft can stay in this tab’s session storage.
Related tools
Continue with related browser-based tools on Toolshelf.
- JSON Formatter & Minifier — JSON formatter online: beautify, minify, and validate JSON in your browser.
- JSON to CSV Converter — Online JSON to CSV converter.
- Code Formatter & Beautifier — Online code formatter and beautifier.
- Text Compare — Online text compare and diff checker.
- Docker Run to Compose — Docker run to Compose converter.
- Case Converter — Case converter online.
- Text to Binary Converter — Text to binary converter online.
- List Converter — List converter online.
Examples
JSON to YAML
{"ok":true,"items":[1,2]} becomes ok: true with a YAML list for items.
Limitations
- YAML comments are dropped when converting to JSON.
- JSON keys that are not valid XML names cannot convert to XML.
- TOML output requires an object at the root.
- Input is capped at 400,000 characters.
What would you like to do next?
Continue working with the next step in this workflow. Recently used tools in this set are listed first.
- JSON Formatter & Minifier — JSON formatter online: beautify, minify, and validate JSON in your browser.
- JSON to CSV Converter — Online JSON to CSV converter.
- Code Formatter & Beautifier — Online code formatter and beautifier.
- Text Compare — Online text compare and diff checker.
You may also need
Continue with related browser-based tools on Toolshelf.
- JSON Formatter & Minifier — JSON formatter online: beautify, minify, and validate JSON in your browser.
- JSON to CSV Converter — Online JSON to CSV converter.
- Code Formatter & Beautifier — Online code formatter and beautifier.
- Text Compare — Online text compare and diff checker.
- Docker Run to Compose — Docker run to Compose converter.
- Case Converter — Case converter online.
- Text to Binary Converter — Text to binary converter online.
- List Converter — List converter online.