JSONWeave

JSONWeave / Convert JSON to CSV or YAML

Processed entirely in your browser

Convert JSON to CSV or YAML

Open your JSON, then export it as CSV for a spreadsheet or as YAML for a config file. The conversion runs in your browser, so the data never leaves your machine.

Convert JSON in the workspace

JSON to CSV

CSV export works on an array of objects, the usual shape of an API list response. Each object becomes a row.

  • The header row holds every key found in any object, in the order they first appear.
  • An object that is missing a key gets an empty cell for it.
  • null values become empty cells.
  • Nested objects and arrays are not flattened. They are written into the cell as JSON text.
  • Values with commas, quotes or line breaks are quoted and escaped.
JSON
[
  { "id": 1, "name": "Ada", "tags": ["admin"] },
  { "id": 2, "name": "Linus" }
]
CSV
id,name,tags
1,Ada,"[""admin""]"
2,Linus,

JSON to YAML

YAML export works on any valid JSON value, not just arrays. The output uses two-space indentation.

JSON
{ "name": "api", "ports": [80, 443] }
YAML
name: api
ports:
  - 80
  - 443

How to export

  • Paste or open your JSON in the workspace.
  • Open the Export menu.
  • Choose Export as CSV or Export as YAML. The file downloads straight away.

When CSV export is not available

If the document is not an array of objects, there is no natural table to write and CSV export reports that it needs an array of objects. Use a query to pull out the array first, or export as YAML instead.

Frequently asked questions

Can I convert nested JSON to CSV?

The top level must be an array of objects. Nested values are kept as JSON text inside the cell rather than flattened into extra columns.

Can I convert JSON to YAML?

Yes. Any valid JSON document can be exported as YAML from the Export menu.

Is my JSON uploaded to convert it?

No. The conversion runs in your browser and the file is created locally.

Related

Ready to try it on your own JSON?

Open the workspace, paste or drop a file, and nothing leaves your browser.

Convert JSON in the workspace