Convert JSON to readable YAML that keeps every value intact.
What it does
JSON to YAML rewrites JSON as YAML, the indentation-based format common in configuration files. The output is plain block YAML: names and text have no quotes unless YAML would read them as something else, text with line breaks is written as a block, and every number keeps its exact text.
It either keeps your structure and every value, or it refuses and tells you why.
What it supports
- Any JSON value can be the top level.
- Objects are written as one name: value line per member and lists as one - value line per item, nested by indentation of 2 or 4 spaces (never tabs).
- Names and text are written plain whenever that is safe. They get quotes only when YAML could read them as something else: “true”, “null”, “yes”, “1.10”, “2026-09-29”, an empty string, text with a space at either end, or text that contains “: ” or starts with a character that means something in YAML. The quotes are single quotes, and a single quote inside is doubled. Accented letters and emoji are written as they are.
- Text with a line break is written as a block that starts with |, so it stays readable; a minus sign after the bar (|-) means the text does not end with a line break. Text with a tab or another control character is written in double quotes, with escapes such as \t and \u0001.
- The empty object is written {}, the empty list [] and the empty string ''.
- Numbers, true, false and null are written without quotes. Numbers are copied exactly: 9007199254740993, 12345678901234567890, 2.370, 1e5 and 1e400 come out as written, and -0 stays -0.
- One YAML document, with no comments, anchors, tags or directives.
Good to know
- YAML version: the output follows the YAML 1.2 rules and does not include a %YAML 1.2 line. Parsers that follow the older YAML 1.1 rules read a number with an exponent but no decimal point, such as 1e5, as text instead of a number. If your program uses YAML 1.1, check numbers written this way.
- Very precise numbers: a number with more digits than a double-precision value can hold, such as 0.12345678901234567890123456789, stays exact in the YAML text. Programs that read numbers as double-precision values, which most do, round it when they load the file. The text itself is never rounded.
- A name longer than 1,024 characters (counted as written, with quotes and escapes) is refused, because YAML only allows simple names up to that length. The tool never shortens a name.
- A name repeated inside one object, or a string with an unpaired surrogate escape, is refused instead of guessed.
- The result can be larger than the JSON, mainly with deep nesting and 4-space indentation. If it passes the size limit, it is refused with an incomplete preview (see below).
How to use it
- Paste or type your JSON in the input box. Nothing runs while you type.
- Choose the indentation (“2 spaces” or “4 spaces”) and press “Convert”.
- Read the YAML next to your input. If the conversion is refused, the message says why.
- Press “Copy” to put the YAML on your clipboard, or “Download” to save it as converted.yaml.
Examples
Plain YAML
Paste this JSON and press “Convert”. Names and text have no quotes, the list is a column of lines that start with -, the empty object is written {}, and the text with a line break becomes a block that starts with |-.
{ "name": "Ada", "tags": ["json", "yaml"], "note": "line one\nline two", "extra": {} }name: Ada
tags:
- json
- yaml
note: |-
line one
line two
extra: {}Repeated names
The name “port” appears twice in the same object, so the tool refuses instead of choosing one of the two values.
{"port": 80, "port": 8080}An object repeats a member name. Programs disagree about which value wins, so the conversion was refused instead of keeping one value and dropping the other. Make the names unique and try again.
Text that looks like something else
Paste this JSON and press “Convert”. “1.10” and “yes” get single quotes, because without them YAML would read a number and a yes/no value. The number 8080 has none because it really is a number, and “São Paulo” has none because it is safe as it is.
{"version":"1.10","enabled":"yes","port":8080,"city":"São Paulo"}version: '1.10'
enabled: 'yes'
port: 8080
city: São PauloExact numbers
Numbers are copied exactly as written, so 1e5, 2.370 and 12345678901234567890 are not rewritten, and -0 keeps its minus sign. Keep the YAML 1.1 note below in mind for 1e5.
[1e5, 12345678901234567890, 2.370, -0]- 1e5
- 12345678901234567890
- 2.370
- -0Limits and privacy
Size limits
- Input: up to 2,000,000 bytes of UTF-8 text (about 2 MB). Accented letters and emoji take more than one byte each. Larger input is rejected.
- Result: also up to 2,000,000 bytes. If the complete result would be larger, the tool shows only an incomplete preview of the first 100,000 bytes, and that preview cannot be copied or downloaded.
- Nesting: up to 256 levels of objects and lists inside each other. Deeper JSON is refused because it is beyond what the tool processes.
- Time: a run that takes longer than its time limit is stopped. Try a smaller input.
Your privacy
The text you type or paste, or open from a local file, is processed locally in your browser, in a dedicated Web Worker. It is never uploaded or sent to the server (a file you open is read in your browser only), and it is not written to storage, cookies or the address bar.
“Copy” puts the result on your clipboard and “Download” saves it as a file, but only when you press the button. The file is created in your browser, so nothing is uploaded.
For the full details, see the Privacy Policy
Related tools and pages
Your text stays in the page when you switch tools in the same tab, so you can try the same text in another tool. Reloading or closing the tab ends it.