Step 1: Add JSON
Paste JSON into the editor, or open a .json file from this browser.
Paste JSON or open a .json file, then convert JSON to YAML in your browser. The text stays on this page and is not uploaded.
Convert JSON to see YAML here.
JSON to YAML conversion writes the same values as a YAML document. A json to yaml converter turns each object into a mapping and each array into a list. You can convert json to yaml online here without sending the text to a server.
Paste JSON into the editor, or open a .json file from this browser.
Choose Convert to YAML. Invalid JSON stays in the editor, and the status line explains the problem.
The preview shows the document produced from the current JSON.
Copy the YAML, or download converted-data.yaml.
{
"name": "Ada",
"active": true,
"score": null,
"city": "東京",
"tags": ["json", "yaml"],
"address": {},
"notes": []
}
name: Ada
active: true
score: null
city: 東京
tags:
- json
- yaml
address: {}
notes: []
Words such as yes, no, on, off, true, and number-like text are quoted. This is a practical help for tools that still read YAML 1.1. It is not a claim that every YAML 1.1 program will accept the file.
{
"yes": "yes",
"no": "no",
"on": "on",
"off": "off",
"flag": "true",
"code": "01",
"version": "1.0",
"empty": "",
"note": "a: b # c"
}
"yes": "yes"
"no": "no"
"on": "on"
"off": "off"
flag: "true"
code: "01"
version: "1.0"
empty: ""
note: "a: b # c"
{ "message": "line1\nline2" }
message: |-
line1
line2
JavaScript reads JSON numbers as floating-point values. Integers outside ±9007199254740991 can change when the text is parsed. A whole number and the same number written as 1.0 become one value. The YAML shows the number JavaScript kept, not a repaired copy of the original digits.
Trailing commas, comments, and single quotes are rejected. The status line includes the parser message. The converter does not rewrite the JSON.
An empty editor, an empty file, or a file that contains only whitespace has nothing to convert.
A file larger than 5 MiB is rejected before it is read.
No. Parsing, conversion, copy, and download all run in your browser.
A plain yes, no, on, off, true, or number-like string can be read as another type. Quotes keep the original text a string.
Use the JSON Viewer to open the tree, the JSON Beautifier to format the text, or the JSON to CSV converter when you need a table.