Features
- Spreadsheet friendlyCells copied from Excel or Google Sheets are already tab-separated.
- Quotes are literalQuote characters are kept as ordinary text.
- Runs on your deviceYour data is processed in the browser and is never uploaded.
How to use the TSV to JSON converter
- Copy cells including the header row.
- Paste them into the input.
- Copy or download the JSON.
TSV compared with CSV
Tabs rarely occur in real text, so TSV usually needs no quoting. That also means a value cannot itself contain a tab or newline.
Convert TSV to JSON in JavaScript
const [head, ...rows] = tsv.trim().split('\n').map((line) => line.split('\t'));
const json = rows.map((row) => Object.fromEntries(head.map((key, i) => [key, row[i]])));
Frequently asked questions
Can I paste straight from a spreadsheet?
Yes.
Why are my numbers strings?
Tick Convert numbers and booleans to type them.
Are empty cells kept?
Yes, as empty strings.