EthicalFusion

TSV to JSON Converter

Convert tab-separated data (copied from Excel) into a clean JSON array of objects.

Was this tool helpful?

Thanks for the feedback!

Copy a range of cells from Excel or Google Sheets, paste it here, and this converter turns the tab-separated text into a JSON array of objects keyed by the header row. Developers use it to turn a quick spreadsheet selection into test data, fixtures or an API payload without saving a file first.

Why copied cells are TSV

When you copy cells from a spreadsheet, the clipboard holds plain text with a tab between columns and a line break between rows: tab-separated values. Paste that into the input box and it looks like columns separated by wide gaps. Include the header row in your selection, because the first line supplies the JSON keys.

Example

Input (tabs between the values):

name	age	city
Asef	28	Mumbai
Riya	31

Output after clicking Convert to JSON:

[
  {
    "name": "Asef",
    "age": "28",
    "city": "Mumbai"
  },
  {
    "name": "Riya",
    "age": "31",
    "city": ""
  }
]

A Records counter shows how many objects were created.

Rules worth knowing

  • Every value is a string. Ages, prices and true/false values come out in quotes, such as "28". Convert types in code if needed, for example rows.map(r => ({ ...r, age: Number(r.age) })).
  • Missing cells become empty strings. Riya's row has no city, so it gets "city": "".
  • Extra cells are dropped. A value beyond the last header column is ignored.
  • Header text is used exactly. A header like "Order ID" becomes the key "Order ID", spaces included.
  • Blank lines inside the data produce an object whose values are all empty strings. Trailing blank lines at the end are removed, but delete empty rows in the middle before copying.
  • At least two lines are required: a header and one data row.

Cells that cause trouble

A spreadsheet cell containing a line break (Alt+Enter in Excel) is copied with quotes around it and a real newline inside, which this converter does not understand; the row gets split in two. Replace line breaks in those cells before copying. Tab characters inside a cell have the same effect. Formulas are not a problem, because the clipboard holds their displayed results, and dates arrive exactly as the sheet shows them, such as 15-01-2026.

TSV, CSV or a file?

If your data is already saved as comma-separated text, use the CSV to JSON Converter, which also handles quoted values. For a whole workbook, where numbers should stay numeric, the Excel to JSON Converter reads the .xlsx file directly. Everything pasted here is converted locally in your browser.

Frequently asked questions

How do I convert spreadsheet cells to JSON?
Select the cells including the header row, copy them, paste into the input box and click Convert to JSON.
Why are my numbers in quotes?
All values are kept as strings because tab-separated text carries no type information. Convert the fields you need to numbers in your code.
Does the first row have to be headers?
Yes. The first line provides the keys for every object, so include your column names when you copy.
Why did one of my rows split into two objects?
A cell probably contained a line break or a tab. Remove those characters from the cells and copy again.
What happens to empty cells?
They become empty strings, so every object has the same set of keys.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.