JSON to YAML
Paste JSON and get YAML, formatted by js-yaml in this tab. You can sort keys if you want a stable document. The output follows js-yaml’s YAML 1.1 style.
JSON
Limits
- The input is limited to 2 MB of UTF-8 text (8 MB if you load a file). Larger files can run out of memory in a phone browser tab.
- Input must be strict JSON. JSON5, comments and trailing commas are rejected.
- IEEE floating-point precision applies: integers larger than 2^53−1 may already have been rounded when JSON was parsed.
- Output is YAML 1.1 as produced by js-yaml, not a guaranteed YAML 1.2 canonical form.
- A JSON document with no root (empty input) is rejected.
YAML
How to use JSON to YAML
- Paste JSONType, paste or load a .json file. It must be valid JSON (no comments or trailing commas).
- Choose indent and key orderSet the indent width and optionally sort keys alphabetically.
- Copy or downloadCopy the YAML or download a .yaml file.
What the YAML looks like
js-yaml dump writes a YAML 1.1 document. Objects become maps, arrays become sequences, and numbers, booleans and null use YAML’s usual literals. Keys can be sorted so diffs are easier to read; otherwise insertion order is kept.
JSON has no comments, so none appear in the output. Very large numbers that JSON parsed as IEEE floats may lose precision. Undefined and functions cannot appear in parsed JSON and are not emitted.
Frequently asked questions
Is my text or file uploaded?
No. Everything runs in your browser tab with JavaScript. Nothing you type, paste or drop is sent to a server, logged or stored by ALink Tools.
Can I keep comments?
No. Standard JSON does not have comments, so there is nothing to keep.
Why did a large id change?
JSON.parse uses JavaScript numbers. Identifiers larger than 2^53−1 should be written as strings in the JSON if you need them exact.
Does this upload my JSON?
No. Conversion stays in this tab.
Related tools
All toolsYAML to JSON
Convert YAML 1.1 to JSON in your browser with js-yaml.
JSON Formatter & Validator
Format, minify, sort keys, and catch syntax errors cleanly.
JSON to CSV
Turn a JSON array of objects into a CSV table, with optional flattening of nested keys.
XML Formatter
Pretty-print or minify XML in your browser, without sending it to a server.