TSV ⇄ JSON Converter
Convert TSV pasted from Excel or Google Sheets to JSON, and JSON back to TSV
Paste TSV or JSON, or load an example.
How to use
- 1.Choose TSV → JSON or JSON → TSV.
- 2.Paste data, upload a file, or load an example.
- 3.Set header, empty-line and output options; open Advanced for header names, value types or nested values.
- 4.Review warnings for duplicate headers or rows with the wrong number of fields.
- 5.Copy or download the .json or .tsv result, or click Swap to convert it back.
What is the TSV ⇄ JSON Converter?
Convert tab-separated values (TSV) to JSON and JSON back to TSV in your browser. Paste cells straight from Excel or Google Sheets, upload a .tsv or .txt file, and get an array of objects keyed by your header row. Values stay strings by default, so IDs and ZIP codes such as 00501 keep their leading zeros.
How tricky data is handled
Quoted values may contain tabs, line breaks and doubled quotes ("") and stay in one cell. CRLF and LF line endings both work, and a UTF-8 byte order mark is removed before the header is read. Duplicate headers are renamed name_2, name_3; empty headers become columnN. Rows with too few fields are padded with empty strings and extra fields are kept as columnN, each with a row-numbered warning. In JSON → TSV, nested objects are flattened with dot notation (user.address.city) by default; bracket notation writes user[address][city]; arrays are written as JSON text.
Limits and privacy
Conversion runs entirely in your browser; nothing is uploaded. Input up to 1 MB converts as you type; larger input waits for Convert, up to 20,000,000 characters. Input and options are saved in browser storage when the input is under 1 MB; clear site data to remove them. Numbers in JSON beyond JavaScript precision are reported, not repaired.
Frequently asked questions
- Can I paste data directly from Excel or Google Sheets?
- Yes. Copying cells from Excel or Google Sheets puts tab-separated text on the clipboard, which this tool reads as TSV. Cells that contain tabs or line breaks are quoted by the spreadsheet and stay in one value, and the first row becomes the JSON keys unless you turn off First row is header.
- Why are my numbers strings in the JSON output?
- Strings are the safe default: IDs, ZIP codes and phone numbers such as 00501 or +62812 would lose leading zeros or signs as numbers. Open Advanced and turn on Detect integers, Detect decimals, Detect booleans or Detect null to convert those values. Values with leading zeros and integers too large for JavaScript still stay strings, with a note.
- What happens to nested objects when converting JSON to TSV?
- By default nested objects are flattened with dot notation, so {"user":{"city":"Bandung"}} becomes a user.city column. Under Advanced you can switch to bracket notation (user[city]), keep each nested value as JSON text in one cell, or reject nested values with an error naming the first offending path. Arrays are written as JSON text.
- Will a TSV → JSON → TSV round trip keep my data unchanged?
- For flat records with string values, yes. Cells containing tabs, line breaks, quotes or edge spaces are quoted when writing TSV and unquoted when reading it, so converting back produces the same JSON. Turning on type detection or formula protection intentionally changes values.
