Format
JSON to YAML
Paste JSON and get YAML maps and sequences. Output stays in the JSON-compatible type set.
Input is processed in your browser. DataToolMage does not upload it, store it, or send it to analytics.
Paste structured data. Work stays in this browser.
How it works
JSON is parsed, then dumped with a JSON-compatible YAML schema and a bounded line width.
Input and output
Input is JSON. Output is YAML text.
Common uses
Object
{"ok":true} becomes a YAML map with a boolean.
Array
A JSON array becomes a YAML sequence.
How to use this tool
- Paste JSON.
- Copy the YAML document.
Limitations
- Not a YAML pretty-printer for non-JSON YAML.
- Does not preserve original JSON whitespace.
- Does not emit merge keys.
Questions
- Will this emit YAML timestamps or binary?
- No. Dumping uses the same JSON-compatible schema as the loader.
- Are object key order and anchors preserved?
- Key order follows JSON.parse. Anchors are not created. Circular references are rejected.
Related tools
YAML to JSON
Paste YAML maps and sequences and get JSON. Only JSON-compatible types are accepted so implicit YAML 1.1 typing cannot rewrite values.
JSON to XML
Paste JSON and get XML elements. Arrays become repeated siblings. A wrapper root is added when JSON has no single root key.
JSON to CSV
Paste objects and get a table. Column order follows first-seen keys. Nested values are serialized as JSON text, not silently dropped.