Practical guide

Convert JSON to TSV for spreadsheet handoffs

Comma-heavy data can make raw CSV unpleasant to inspect; TSV gives those commas room by using tabs as separators. The file remains a plain-text table, and the app that imports it still controls how each cell is displayed and typed.

Choose TSV when the receiving system calls for tab-separated values. For spreadsheets, it works best when the import screen lets you set the delimiter to tab and inspect column types before loading the data.

When TSV is better than CSV

CSV and TSV solve the same table problem with different delimiters. If your data contains many commas in names, addresses, notes, or lists, TSV can be easier to review as raw text. If your data contains tabs, TSV still needs quoting and a careful import check.

The export should start from an array. If your JSON root is an object with records at a nested path, create a query result first and export that array. The CSV guide covers the same row-shaping problem with comma-delimited output.

Warehouse handoff workflow that exports 850 inventory rows, inspects quoted tabs and multiline cells, then imports the actual TSV with an explicit tab delimiter and text-preserved aisle identifiers.

Copyable TSV example

This example starts with a realistic root object, then selects the array at .inventory.items. The shaped array includes a nested object, a literal tab inside one value, and a missing nested value. Nested object fields become path columns; the tab-containing cell is quoted.

Source JSON with root wrapperjson
{
  "inventory": {
    "items": [
      {"id":"sku-1","name":"Desk, oak","warehouse":{"bin":"A\t7"},"qty":12},
      {"id":"sku-2","name":"Lamp, brass","qty":5}
    ]
  }
}
JQ query for the rowsjq
.inventory.items
Shaped array to exportjson
[
  {"id":"sku-1","name":"Desk, oak","warehouse":{"bin":"A\t7"},"qty":12},
  {"id":"sku-2","name":"Lamp, brass","qty":5}
]
TSV outputtsv
id	name	warehouse.bin	qty
sku-1	Desk, oak	"A	7"	12
sku-2	Lamp, brass		5

Export and import

  1. Open the JSON source locally in JSON All-in-One.
  2. Select or query the array that should become rows, such as .inventory.items for the example above.
  3. Choose Export, then TSV.
  4. Save the file with a .tsv extension so the receiver has a useful hint.
  5. In the spreadsheet or database import flow, choose tab as the delimiter and review text columns before accepting automatic type detection.
TSV anatomy showing delimiter tabs, a quoted tab inside a note, a multiline logical record, and a leading-zero aisle imported as text.
TSV import contract separating delimiter tabs from tabs inside quoted cells, physical lines from logical records, and numeric-looking identifiers from numeric quantities.

Tabs and newlines are data too

A tab inside a JSON string is not a separator chosen by the exporter; it is part of the cell value. The output quotes that cell so the row still has the right number of columns. Newlines can also exist inside quoted cells, which means a raw line count is not always the same thing as a record count.

If your receiver cannot handle quoted tabs or multiline cells, reshape the value first. For example, replace tabs with spaces or project a shorter note field before exporting.

A practical review is to open the saved file in a plain text editor before importing it. Turn on visible whitespace if your editor supports it. You should see one tab between ordinary cells, quotes around any cell that contains a tab or newline, and the same number of logical fields in each record.

TSV does not remove spreadsheet coercion

TSV avoids comma ambiguity, but it does not stop a spreadsheet from converting dates, long IDs, or formula-like text. Treat cells beginning with =, +, -, @, tabs, or newlines as spreadsheet-sensitive; a value such as @danger or -42 may be apostrophe-prefixed for safer import.

That protection is a safety behavior, not a guarantee that the receiving app will preserve every value exactly. Review the imported table, especially identifier, amount, and date columns.