Format Code Now
/
ConvertTSV to JSON Converter Next: WSDL to JSON Converter ›

TSV to JSON Converter

CV-69

Paste tab-separated values and get JSON. The first row becomes the keys and each later row becomes an object, or a list of lists if there is no header.

Runs in your browser. Nothing is uploaded.

TSV

JSON

How to use it

  1. Paste the TSV into the input box, or open a .tsv file and drop it on the box.
  2. Leave First row is header on, or turn it off to get a list of lists.
  3. Turn on Convert numbers and true/false if you want JSON numbers and booleans.
  4. Pick an indent, then copy the JSON or download it as a .json file.

Text by default, types on request

Every value is a string by default, so 007 keeps its leading zeros and a phone number is not changed. With Convert numbers and true/false on, whole numbers of up to 15 digits and simple decimals become JSON numbers, true and false become booleans, and empty cells become null. Longer integers and values with a leading zero stay text. Because this goes through a JavaScript number, 1.50 is written as 1.5.

Quotes, headers and short rows

With the quote option on, a cell can be wrapped in double quotes to hold tabs or line breaks, and "" inside is one quote. Turn it off if your quotes are ordinary characters, such as inch marks. Blank header names become column_1, column_2 and so on, and repeated names get _2 and _3 so no key is lost. Short rows are padded with null, a leading byte order mark is removed and blank lines are skipped.

Where the data comes from

TSV is what you get when you copy cells from Excel or Google Sheets, so you can paste a selection straight in. The conversion uses the same engine as the CSV to JSON tool with the tab as the delimiter, so the two behave the same way. It reads up to the size your browser can hold in memory and runs entirely on your computer.

Error messages and what to do

MessageWhat it meansFix
A quoted field is never closed (missing closing ")A cell starts with a double quote that has no matching end quote.Add the closing quote, or turn off the quote option if the quote is an ordinary character.

Questions people ask

How do I convert TSV to JSON?

Paste the TSV into the input box. The JSON appears on the right, using the first row as keys. Copy it or download it as a .json file.

Can I paste straight from Excel or Google Sheets?

Yes. Copied cells are tab separated, which is exactly what TSV is. Paste them in and the JSON is ready. The result updates as soon as you change the input or an option.

Why are my numbers in quotes?

Values stay text by default so nothing like 007 or a long ID gets changed. Turn on Convert numbers and true/false to get JSON numbers where they are safe.

What if there is no header row?

Turn off First row is header. You get an array of arrays, one inner array per row, instead of objects. You can try it with the sample first to see the output.

What if a cell contains a tab or a line break?

It must be wrapped in double quotes, with the quote option on. The tool then keeps the tab or line break inside the value instead of splitting there.

About this tool

This uses the same engine as the CSV to JSON tool with the tab as the delimiter. With a header row, each later row becomes an object keyed by the header; without one you get a list of lists. Values stay text by default, so 007 keeps its zeros. With Convert numbers and true/false on, whole numbers of up to 15 digits and simple decimals become JSON numbers, true and false become booleans, and empty cells become null; longer integers and values with a leading zero stay text. Because that goes through a JavaScript number, 1.50 comes out as 1.5. When double quotes can enclose a cell, a cell may hold tabs and line breaks inside quotes and "" is one quote; when the option is off, quotes are ordinary characters. Blank header names become column_1, column_2, and repeated names get _2, _3. Short rows are padded with null, and blank lines are skipped.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.