TSV to JSON Converter
Convert Tab-Separated Values (TSV) to JSON format
Tip: Paste your TSV data with tab-separated values. The first row will be used as object keys in the JSON output.
Runs in your browserInput TSV
Convert TSV to JSON in your browser
Paste tab-separated text, open a .tsv file or drop it on the input window, and the JSON appears as you type. Every line after the header becomes one object in a JSON array, keyed by the column names. Copy the result or download it as a .json file.
The fastest source of TSV is a spreadsheet: select cells in Excel or Google Sheets, copy, and paste them here, header row included. Commas inside a cell need no quotes, because only tabs separate the columns.
TSV to JSON example
Real output for a small product list. Quantities become numbers, the SKUs and the price 4.50 stay strings:
sku product qty price
00412 Desk lamp, brass 2 39.9
00977 USB-C cable 10 4.50
[
{
"sku": "00412",
"product": "Desk lamp, brass",
"qty": 2,
"price": 39.9
},
{
"sku": "00977",
"product": "USB-C cable",
"qty": 10,
"price": "4.50"
}
]
Which TSV cells become JSON numbers
A cell becomes a number only when the number reads back exactly as the cell. Everything else stays a string:
-
TSV
2,10,39.9JSONBecome numbers. Writing them as JSON numbers loses nothing.
-
TSV
00412,4.50JSONStay strings. As numbers they would turn into 412 and 4.5, and an SKU or a price label would change.
-
TSV
12/03/2025,TRUEJSONStay strings as well. Dates and spreadsheet booleans are not guessed, so your code decides what they mean.
-
TSV
An empty cell
JSONBecomes an empty string, and a line with fewer cells than the header gets empty strings for the rest, so all objects share the same keys.
Tabs, quotes and column names
Handled
- A cell copied with a line break, which spreadsheets put in double quotes, stays one value with
\nin the JSON - Header names are trimmed, an empty one becomes
column_Nand a repeated one gets its position added - Blank lines are skipped instead of becoming empty objects
Not done
- Split on commas or spaces: use the CSV to JSON converter for comma-separated data
- Nest objects from names like
address.city - Keep cells beyond the last header column
Need the TSV back?
The JSON to TSV converter writes an array of objects back to tab-separated rows you can paste into a sheet.
TSV to JSON questions
Select the cells in Excel or Google Sheets with the header row, copy them and paste them into the input window. The clipboard holds TSV, so the JSON appears at once.
As a JSON number it would become 4.5, and the value would no longer match your sheet. Values that read back the same, such as 39.9 or 10, become numbers.
Yes. Click Open file and pick a .tsv, .tab or .txt file, or drop it on the input window; Download saves the JSON as a .json file.
The output is indented with two spaces. For a single line, paste it into the JSON minifier; to validate and re-indent JSON after you edit it, the JSON beautifier.
No. Converting runs in your browser, and an opened file is read there too.