Convert JSON to YAML Online

Paste JSON, get YAML. Useful for turning an API response or a fixture file into something that reads well in a config file or a Kubernetes manifest.

From

The only part of this site that uses a server. The address is sent to it so the page can be fetched, because a browser is not allowed to fetch someone else's page itself. Your own files are never involved.

Nothing here is uploaded. The parsing happens on this page.
Edit
Paste or upload something above and it will appear here.
ToDataMarkupDocumentsCodeSchemasImages

The output will appear here once there is a table to convert.

What JSON is

JSON is a text format for nested data: objects with named keys, arrays, strings, numbers, booleans and null. It has no date type and no comments.

Every web API, most configuration files and anything that talks to JavaScript.

What YAML is

YAML uses indentation instead of brackets. It is a superset of JSON, supports comments, and is meant to be edited by hand.

Kubernetes manifests, CI pipelines, Ansible playbooks and most modern config files.

What changes when you convert JSON to YAML

Four shapes all read correctly: an array of objects, an array of arrays with a header row, an object of column arrays, and an object keyed by row id. A single wrapper key holding the array, which is how most APIs reply, is unwrapped automatically. Nested objects are flattened one level into dotted keys; anything deeper is kept as JSON text in the cell, because a table cannot hold a tree.

You get a list of maps, one per row, with long lines left unwrapped so values do not get folded across lines.

Brackets and braces become indentation. YAML is a superset of JSON, so nothing is lost in the direction JSON to YAML. Every valid JSON document is already valid YAML; what changes is that it becomes readable.

Keys are written bare where they can be and quoted where they cannot. A key with a colon or a leading digit in it gets quotes, because leaving them off would change what it means.

Long values are left on one line rather than folded. Folded scalars are legal and they are also the fastest way to introduce a whitespace bug into a config file.

What carries over from JSON to YAML

YAML can express everything JSON holds about a table, so this conversion is about shape rather than loss.

Both formats record types, so numbers, booleans and nulls survive as themselves rather than as text.

The identifier 007 comes out of the YAML as 007. Reading it as a number would have made it 7, and an id that changes value is worse than one that stays text.

The role "Analyst, data" survives with its comma, in one cell rather than split across two. That is the first thing to check in any converted table, and the usual place a YAML file goes wrong.

The quotes around Jonah "Jo" Pryce are left as a plain quote character in the YAML.

A worked example

Three rows of staff data, with an identifier that has a leading zero, a value containing a comma, a value containing quotes and one blank cell. Those are the four places formats disagree, so they are the four places to look.

JSON in
[
  { "id": "007", "name": "Halima Yusuf", "role": "Analyst, data", "started": "2024-03-15", "hours": "38.5" },
  { "id": "012", "name": "Jonah \"Jo\" Pryce", "role": "Engineer", "started": "2025-11-02", "hours": "" },
  { "id": "104", "name": "Wei Chen", "role": "Manager", "started": "2023-06-30", "hours": "40" }
]
YAML out
- id: '007'
  name: Halima Yusuf
  role: Analyst, data
  started: '2024-03-15'
  hours: '38.5'
- id: '012'
  name: Jonah "Jo" Pryce
  role: Engineer
  started: '2025-11-02'
  hours: ''
- id: '104'
  name: Wei Chen
  role: Manager
  started: '2023-06-30'
  hours: '40'

Questions

How do I convert JSON to YAML?

Paste your JSON into the box above or drop the file onto it. Check the table in the grid, then copy or download the YAML from the output panel. It takes one step and the data never leaves your browser.

Why did my zip code lose its leading zero?

Type inference turned the text 07030 into the number 7030. Tablizer leaves inference off by default for exactly this reason, and refuses to convert any value starting with a zero followed by a digit even when it is on.

Why did my YAML value change meaning?

YAML reads several bare words as booleans. In the 1.1 spec that includes yes, no, on and off, which is why a country column containing NO for Norway can arrive as false. Quote values you want kept as text.

Why does my YAML have quotes around some values and not others?

Values that YAML would otherwise read as something else get quoted. The word no reads as false, a value like 1.10 reads as a number and loses its trailing zero, and a string starting with an asterisk reads as an alias. Quoting those is what keeps them text.

Is there a limit on file size?

No. The work happens on your own machine, so the limit is your machine's memory rather than an upload cap. A file with tens of thousands of rows converts in a second or two.

Is my data uploaded anywhere?

No. The parsing and generating are done by JavaScript running on this page. You can watch the network tab while you convert and see that nothing is sent.

Related conversions