TSV to JSON

Convert tab-separated values into JSON.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

TSV to JSON Converter Online

The TSV to JSON converter turns tab-separated values into JSON arrays or objects. TSV is what you get when you copy cells from Excel, Google Sheets, or LibreOffice, and it is the native export format of many scientific tools, SEO crawlers, and database clients. This page gets that data into JSON for a script, API payload, or test fixture in a single paste.

Why TSV converts cleanly

Tabs almost never occur inside real values, so TSV rarely needs quoting. Addresses, product names, and descriptions full of commas come through intact without any special handling. The converter splits each line on tab characters, uses the first line as keys, trims surrounding spaces, and pads short rows with empty values.

Output shapes

  • Array of objects – one object per row; the most common shape for APIs and document databases.
  • Array of arrays – the header followed by each row as an array; compact and chart-friendly.
  • Object of columns – every column becomes an array, ideal for plotting or statistics.
  • Keyed by first column – a dictionary of records indexed by an ID column.

Types, empty cells, and nesting

With Detect numbers & booleans on, 42 becomes a number and true a boolean, while identifiers with leading zeros such as 00501 remain strings. Empty cells can be written as "" or null. Headers like address.city can be expanded into nested objects with Dot keys → nested objects, the opposite of the flattening done by JSON to TSV.

Header-less data

If you copied only data rows, switch off First row is a header; keys are then named column1, column2, and so on. The table preview under the editor shows how every line was split, which makes a missing tab easy to spot.

Working with comma-separated files instead? Use CSV to JSON. Other targets for tab-separated data are TSV to XML and TSV to HTML. Validate the output with the JSON Validator or browse it in the JSON Viewer.

Frequently Asked Questions

Yes — that is the fastest way to use this tool. When you copy a range of cells, spreadsheets put it on the clipboard as tab-separated text. Paste it into the input and the JSON appears immediately, with the first row used as keys.

The input is split on tab characters only, so commas, semicolons, and pipes inside values are ordinary text. A value like “Smith, John” stays one string in the JSON.

By default an empty cell becomes an empty string. Choose null under “Empty cells” if your API or database distinguishes between a missing value and an empty one.

An object whose keys are the values of the first column, for example {"1": {"name": "Jane Doe", …}}. It is convenient for lookup tables. If the first column has duplicate values, the later row wins, so use a unique ID column.