TSV to JSON
Convert tab-separated values to JSON. Paste directly from Excel or Google Sheets — the first row is used as keys.
What is TSV to JSON conversion?
TSV stores one record per line with fields separated by the Unicode tab character (U+0009). Converting to JSON maps the header row to property names and each following line to an object. Because tabs rarely appear inside spreadsheet cells, TSV usually needs no quoting rules — this parser is a split, not an RFC 4180 state machine.
TSV (tab-separated values) is what you get when you copy a cell range in Excel, Google Sheets, Numbers, or LibreOffice Calc. This converter splits on tab characters, treats the first row as keys, and builds a JSON array of objects. Unlike CSV to JSON, there is no quoting mode: a field is the text between tabs, and a quote character is just another character. That is why TSV is convenient for clipboard paste — spreadsheets already escaped the delimiter by using a tab. Values are always strings after trim(). A file with fewer than two lines (header only, or a single row of keys) yields []. Conversion stays in the browser; copy or download the JSON when you are done. To go the other way, use JSON to TSV. If your data uses commas and RFC 4180 quotes instead of tabs, use CSV to JSON.
When to use this tool
- Clipboard from a sheet — Select a range, copy, paste. The clipboard payload is TSV even if the file on disk is .xlsx.
- Database or warehouse extracts — Some dumps use tabs to avoid comma-in-address problems. Paste them here for a JSON fixture.
- When CSV quoting is in the way — If a CSV exporter mangled quotes, a TSV export from the same sheet is often cleaner to parse.
- Format the JSON — Output is indented with two spaces. Open JSON Formatter if you want to minify or validate further. JSON Formatter
How to use the TSV to JSON Converter
Copy a range from a spreadsheet
Include the header row. Excel and Google Sheets put tabs between columns and newlines between rows on the clipboard.
Paste into TSV Input
Sample shows a four-column table (id, name, email, city). Clear empties the pane. Carriage returns at the end of lines are stripped.
Read the objects
Each data line becomes one object. Header cells are trimmed for keys; missing columns on a short row become "". Extra columns past the header are ignored.
Copy or download
Copy puts the pretty-printed array on the clipboard. Download saves output.json.
Worked examples
Paste-style table with a header
id name email city 1 Alice alice@example.com New York 2 Bob bob@example.com London
[
{
"id": "1",
"name": "Alice",
"email": "alice@example.com",
"city": "New York"
},
{
"id": "2",
"name": "Bob",
"email": "bob@example.com",
"city": "London"
}
]id stays the string "1". Tabs in this example are real tab characters.
Header only — not enough rows
name age
[]
The parser requires at least one header line and one data line.
Tips
- Include headers in the copy. Without a second line the result is an empty array.
- Trim happens on keys and values, so " Alice " becomes "Alice".
- This is not the CSV parser — delimiter, quoting, and semicolon mode live on CSV to JSON.
- JSON to TSV is the inverse, with the extra rule that tabs inside values become spaces.
Frequently Asked Questions
Can I paste directly from Excel or Google Sheets?
Yes. Copying a cell range places tab-separated text on the clipboard. Paste into TSV Input; the first row becomes JSON keys.
Does TSV to JSON honor CSV-style quotes?
No. Lines are split on every tab. A double quote is stored as part of the string. If your file is comma-separated with quoted commas, use CSV to JSON instead.
What if a cell contains a tab?
A literal tab inside a field will split that field. Spreadsheets almost never put tabs in cells. If you have tabs in values, export JSON to TSV (which replaces tabs with spaces) or use CSV.
Are empty lines kept?
Blank lines after trim are skipped. A trailing newline does not create an extra empty object.
Is any of this uploaded?
No. Splitting and JSON.stringify run in the page. Internal tables never leave the device.