1xA2ZOne Data. Any Format.
Live syncLocal-first · no data upload

Convert JSON to YAML

This tool handles table-shaped data only: JSON is read as rows and columns and written out as YAML, so nesting is not preserved. Every key and every value in the YAML is a double-quoted string.

Runs entirely in your browser. Your data is never uploaded. Tiếng Việt

01

Spreadsheet

SheetsExcelCSVTSV
✦ Quick pasteSheets / Excel, CSV, TSV, Markdown, JSON, HTML, LaTeX, wiki…
0 rows · 0 columnsSelected cell: A1
02

Live Output

Markdowntwo-way
SyncedEdit directly; the table on the left updates itself
0 characters
Every change is processed right in your browserReady · LocalUTF-8 · by xuanhieu.org

When you need to convert JSON to YAML

You may want YAML for a config file, seed data or documentation while holding JSON from an API. For nested data the tool relies on Flatten nested objects (a.b.c): inner objects become keys like customer.name and arrays become order.items.0, order.items.1. In the YAML that flat key is just a string, not a child map. If you need real multi-level YAML, this is the wrong tool.

How to do it

  1. Paste JSON into the Quick paste box and press Load into table ↵, or choose a .json file with Import file.
  2. Check the grid: column names such as customer.name show the nested parts were flattened as expected.
  3. Open ⚙ Options on the YAML tab and set YAML style: a list of mappings uses headers as keys, a list of rows keeps the header as the first row.
  4. Press Copy result or Download file to get a .yaml file.

A real example

The amount 450 appears as "450" because YAML here always writes quoted strings. The key "customer.name" is one flat key containing a dot, not a map customer holding name. An empty cell comes out as the empty string "".

Input · JSON

[
  {
    "id": "A1",
    "customer": {
      "name": "Anna Reed",
      "city": "London"
    },
    "order": {
      "total": 450,
      "items": [
        "book",
        "pen"
      ]
    }
  },
  {
    "id": "A2",
    "customer": {
      "name": "Ben Cole",
      "city": "Leeds"
    },
    "order": {
      "total": 1250,
      "items": [
        "backpack"
      ]
    }
  },
  {
    "id": "A3",
    "customer": {
      "name": "Cara Lin",
      "city": "Bristol"
    },
    "order": {
      "total": 299.5,
      "items": [
        "notebook",
        "pen",
        "ruler"
      ]
    }
  }
]

Result · YAML

- "id": "A1"
  "customer.name": "Anna Reed"
  "customer.city": "London"
  "order.total": "450"
  "order.items.0": "book"
  "order.items.1": "pen"
  "order.items.2": ""
- "id": "A2"
  "customer.name": "Ben Cole"
  "customer.city": "Leeds"
  "order.total": "1250"
  "order.items.0": "backpack"
  "order.items.1": ""
  "order.items.2": ""
- "id": "A3"
  "customer.name": "Cara Lin"
  "customer.city": "Bristol"
  "order.total": "299.5"
  "order.items.0": "notebook"
  "order.items.1": "pen"
  "order.items.2": "ruler"

Options worth changing

YAML style
Choose list of mappings for readable key: value blocks, at the cost of dropping the header row from the data. Choose list of rows if you want to keep the header as an ordinary line.
Flatten nested objects (a.b.c)
This option sits on the JSON tab and applies when JSON is loaded. Leave it on to split nested parts into columns. Turn it off and each nested part sits in a cell as JSON text, and the YAML carries that string as is.

Common problems

Limits

Frequently asked questions

Why are numbers inside double quotes?

The grid holds every value as a string and the YAML says exactly that, so 450 becomes "450". It also keeps IDs with leading zeros intact.

Do nested objects become nested YAML maps?

No. Nested parts are flattened into keys like customer.name and written at the same level. The tool does not produce multi-level YAML.

Can I paste my own YAML?

Only if it matches one of the two shapes this tool writes: a list of rows, or a list of key: value mappings with quoted strings.

Which style should I use for a config file?

A list of mappings is usually easier to read because of the key names. Check that the application accepts keys with dots and string values.

Is my JSON uploaded?

No. Reading the JSON and building the YAML happen in your browser.

Related conversions

1xA2Z · Guide

Table statistics