Free Online JSON to YAML Converter

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.

JSON input

YAML output

Convert JSON to see YAML here.

What Is JSON to YAML Conversion?

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.

How to Convert JSON to YAML

Step 1: Add JSON

Paste JSON into the editor, or open a .json file from this browser.

Step 2: Convert

Choose Convert to YAML. Invalid JSON stays in the editor, and the status line explains the problem.

Step 3: Read the YAML

The preview shows the document produced from the current JSON.

Step 4: Copy or download

Copy the YAML, or download converted-data.yaml.

JSON to YAML Examples

Nested values

{
  "name": "Ada",
  "active": true,
  "score": null,
  "city": "東京",
  "tags": ["json", "yaml"],
  "address": {},
  "notes": []
}
name: Ada
active: true
score: null
city: 東京
tags:
  - json
  - yaml
address: {}
notes: []

Strings that must stay strings

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"

A line break inside a string

{ "message": "line1\nline2" }
message: |-
  line1
  line2

JSON Numbers in the Browser

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.

Common Conversion Errors

Invalid JSON

Trailing commas, comments, and single quotes are rejected. The status line includes the parser message. The converter does not rewrite the JSON.

Empty input

An empty editor, an empty file, or a file that contains only whitespace has nothing to convert.

File too large

A file larger than 5 MiB is rejected before it is read.

Frequently Asked Questions

Does this json to yaml tool upload my data?

No. Parsing, conversion, copy, and download all run in your browser.

Why are some strings quoted?

A plain yes, no, on, off, true, or number-like string can be read as another type. Quotes keep the original text a string.

Where can I inspect the JSON first?

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.