JSON to TSV

Convert JSON data to TSV format instantly.

A list of objects, a single object, an object that holds the rows (such as {"data": [...]}), or JSON Lines (one object per line).

Worth a look

Rate this tool

How useful was this tool?

JSON to TSV Converter

Paste or type JSON into the box, load the Example, or Open a file (you can also drag it onto the page). It converts as you type. A preview shows the first five rows, with counts for rows, columns and size. The full TSV appears below it, ready to Copy or Download .tsv.

Notes under Worth a look explain how the tool read your data and what it did, with counts. For example: which list it used as the rows, or how many values contained line breaks.

The conversion runs in your browser. Nothing you paste or open is uploaded or stored.

Why TSV

TSV (tab-separated values) is CSV with a tab between the values instead of a comma. That small difference helps in two ways:

Commas don’t get in the way. Addresses, descriptions and numbers with decimal commas are full of commas, but almost never contain tabs. In CSV, every such value has to be quoted. In TSV, it doesn’t.

It pastes straight into a spreadsheet. When you copy cells in Excel or Google Sheets, they’re copied as TSV. So the reverse works too: click Copy, select a cell in your spreadsheet, and paste. The data lands in rows and columns with no file and no import dialog. Tabs also mean the same thing in every country. CSV files, by contrast, open in a single column in a European Excel that expects semicolons.

Example: one row per list item

Orders are a typical case. Each order has a list of items:

[
  {
    "order": 1001,
    "customer": "Maria Silva",
    "items": [
      { "sku": "TEA-01", "qty": 2 },
      { "sku": "MUG-07", "qty": 1 }
    ],
    "note": "Gift wrapnLeave at door"
  },
  {
    "order": 1002,
    "customer": "John Smith",
    "items": [
      { "sku": "TEA-02", "qty": 3 }
    ],
    "note": "Leave at reception"
  }
]

With One row per list item on, nested values as columns, and line breaks replaced with a space, you get one row per item ordered:

order customer items.sku items.qty note
1001 Maria Silva TEA-01 2 Gift wrap Leave at door
1001 Maria Silva MUG-07 1 Gift wrap Leave at door
1002 John Smith TEA-02 3 Leave at reception

 

The order details repeat on each of its rows. That’s what you want in a spreadsheet: you can filter by product, add up quantities, or build a pivot table.

With the option off, each order stays a single row, and the items spread sideways into items.0.sku, items.0.qty, items.1.sku and so on. That’s better when you want one line per order, and when orders have only a few items.

Tabs and line breaks inside values

A value that contains a tab or a line break would break the table, because those characters are what separate columns and rows. The strict TSV standard simply doesn’t allow them inside values. You choose what happens instead:

Replace with a space. “Gift wrap” and “Leave at door” become one line of text. This is the safest choice for spreadsheets, and the text stays readable. You only lose the line breaks themselves.

Write as t and n. The tab or line break is written as a backslash code. Use this when the file goes to a program that understands those codes and turns them back into real characters, such as PostgreSQL’s COPY command or MySQL’s LOAD DATA, which both read this format by default.

Quote the value like CSV. The value is wrapped in double quotes, and the line break is kept inside. Excel and Google Sheets read this correctly, so the cell shows two lines. Stricter TSV readers don’t understand the quotes, though, so use this only when the file is meant for a spreadsheet.

The note under the result says how many values were affected, so you know whether the choice matters for your data.

Formula protection

Excel treats any cell that starts with =, +, - or @ as a formula. That causes two kinds of trouble:

  • Accidental. A phone number like +44 20 7946 0958, or a note like -50% for returning customers, can turn into a formula error instead of showing the text.
  • Deliberate. Someone can type =HYPERLINK(...) or a worse formula into a web form. If you export those entries and open them in Excel, the formula runs.

With Formula protection on, any text that starts with =, +, - or @ gets an apostrophe in front, so a spreadsheet shows it as text instead of running it. The apostrophe is part of the file: when you open it, the cell reads '=SUM(A1). Use the option for data that came from other people. Leave it off for files that go to other programs, because the apostrophe becomes part of the value. Numbers aren’t affected: -5 stays a negative number.

Values stay as written

  • Long integers keep every digit, and 1.0 stays 1.0.
  • Keys keep their order, so the columns appear in the order of the JSON.
  • True and false are written as true and false.
  • Null becomes an empty cell.
  • Escape codes like u00e9 are written as the characters they stand for, here é.

For more on why long numbers often change during conversion, and how to stop Excel changing them on import, see JSON to CSV.

JSON it accepts

The same shapes as the JSON to CSV tool:

  • A list of objects
  • A single object
  • An object holding the rows, like {"data": [...]}
  • JSON Lines
  • A list of plain values
  • A list of rows that are themselves lists, like [["Maria", 2], ["John", 3]]

If the JSON has a mistake, you get the line and column, the message, how to fix it, and an excerpt; Show it in the text selects the character. If the JSON is valid but can’t become a table, such as a single number or an empty list, the tool explains that in plain words.

Downloading for Excel or for a program

For Excel adds a byte order mark, an invisible marker at the start of the file that tells Excel the text is UTF-8. Without it, Excel can turn é into é.

Untick it when the file goes to a script or database instead. Some programs read the marker as part of the first column’s name, so a column called order silently becomes ufefforder.

The download is named after the file you opened, so orders.json becomes orders.tsv.

FAQ

Should I use TSV or CSV?

  • Use TSV for pasting into a spreadsheet, or when values are full of commas.
  • Use CSV when the program you’re sending the file to asks for CSV, since it’s the more widely expected format.

JSON to CSV handles the second case.

How do I open a .tsv file in Excel?

Excel doesn’t always open .tsv files with a double-click. Use Data > From Text/CSV, or just copy the result and paste it into a sheet. In Google Sheets, use File > Import, which detects tabs automatically.

Can I convert TSV back to JSON?

Yes, with TSV to JSON.

Is my data uploaded anywhere?

No. Everything happens in your browser, and nothing you paste or open is stored.

Note: All processing is done client-side. We do not store or see your data.

Contact

Missing something?

Feel free to request missing tools or give some feedback using our contact form.

Contact Us