Skip to content
MagicWebBox
Sign in

JSON / YAML / CSV converter

JSON, YAML and CSV, any direction

Source data (JSON)

Result (YAML)

Paste some data to convert it.

About this tool

This converter moves data between JSON, YAML and CSV, in all six directions. Use it to turn a spreadsheet export into JSON for an API, rewrite a JSON configuration file as YAML, or open a list of objects pulled from a database in Excel or Google Sheets without writing a script.

For CSV, you choose the delimiter (comma, semicolon or tab), say whether the first row holds the column names, and turn on detection of numbers, booleans and null. Quoted fields and line breaks inside them are handled. Going the other way, nested values are written as JSON in the cell. Syntax errors are reported with their line and column.

How to use it

  1. Pick the “Source format” and the “Target format”.
  2. Paste your data into “Source data”, or click “Sample”.
  3. When CSV is involved, set the “Delimiter”, “First row = column names” and “Detect numbers, booleans and null”.
  4. Check the “Result”, then click “Copy” or “Download”.
  5. Click “Swap” to convert the result back to the original format.

Frequently asked questions

How do I convert nested JSON to CSV?

You need an array of objects (one row per object) or an array of arrays. Columns cover every key found, in order of first appearance. Nested values, whether objects or arrays, are not flattened: they are written as JSON inside the cell.

Why do my ZIP codes stay as text?

Type detection turns 42, true, false and null into real values, but numbers with a leading zero, such as 01234, stay as text so the zero is not lost. Uncheck the option to keep every cell as text.

How does the tool report errors in my data?

It gives the line and column of the problem and shows that line with a marker. For CSV, it also catches a quote that is never closed and rows that do not have the same number of fields as the header.

Is my data sent to a server?

No. Conversion runs in your browser as you type. Pasted data is neither sent nor stored; only your settings, such as the chosen formats and the delimiter, are remembered locally in this browser.