TSV to JSON Converter

Convert TSV to JSON in your browser, with no upload and no sign-up.

Everything is processed in your browser. Nothing you paste is uploaded or stored.

In-depth guide

TSV to JSON: tab-separated parsing, quotes and pasted spreadsheet data

How this converter reads tab-separated text (tab only, first row as header, CSV-style quoting honoured, everything a string), how that differs from the IANA text/tab-separated-values definition, and how ragged rows and blank lines behave.

Last verified: Sources: IANA — text/tab-separated-values Plain-text version of this guide

Key figures at a glance

Delimiter
Tab only
Commas and spaces are ordinary characters; a literal backslash followed by t is not turned into a tab.
Source: IANA — text/tab-separated-values
Header row
Always the first row
Its cells become the JSON keys; there is no option to turn headers off.
Value types
Every value is a string
30 becomes "30", 007 stays "007".
Quotes
A field that starts with " is read as quoted
Inside it, tabs and line breaks are kept and "" is one quote. The IANA registration defines no quoting.

What the converter does

Paste tab-separated text and the right-hand box shows a JSON array with one object per data row, indented with two spaces. It updates as you type, nothing is uploaded, and a Download link (converted.json) appears when there is output. This is the natural format for data copied out of a spreadsheet range, because spreadsheet programs typically put a tab between cells and a line break between rows; paste straight into the left box.

Example input (here → stands for a tab character):

name→city→age
Mei→Singapore→30
Ali→Johor→25

gives

[
  { "name": "Mei", "city": "Singapore", "age": "30" },
  { "name": "Ali", "city": "Johor", "age": "25" }
]

Values are always strings: "30", not 30. Commas, spaces and semicolons mean nothing here, so 1, 2 stays "1, 2".

TSV in the standard versus this tool

The IANA registration for text/tab-separated-values is short. Each record is a single line, fields are separated by tabs, every record has the same number of fields, the first line names the fields, and "fields that contain tabs are not allowable in this encoding". It defines no quoting or escaping, so a strict reader cannot represent a tab or line break inside a value.

This tool is more generous. It uses the same quote handling as its CSV sibling (the convention of RFC 4180): a field whose first character is " is a quoted field in which tabs and line breaks are literal and "" stands for one quote. So "has<TAB>tab" becomes the single value has\ttab and "two<newline>lines" a two-line value. That helps with files written by tools that quote, but it means a plain value that happens to start with a double quote is consumed as a quote, and a stray quote at the start of a field with no closing quote fails with "A quoted field was never closed — check for a stray double quote."

A double quote in the middle of a field is kept as text (x"y stays x"y). Spaces are never trimmed. Escape sequences are not decoded: the two characters \ and t stay as they are.

Rows, headers and blank lines

Input Result
row with fewer cells missing cells become ""
row with more cells than the header extra cells are dropped silently
duplicate header names the later column wins
empty header cell key column_N, N being the position
blank line between rows a record of empty strings
header row only []
CRLF, CR or LF line endings all accepted; a single trailing newline is ignored
UTF-8 byte-order mark first kept in the first key's name

A row that is x followed by a tab (empty second cell) gives {"a":"x","b":""}, and a leading tab gives an empty first value. This matters when pasting from a spreadsheet: trailing empty cells are preserved as empty strings, not dropped.

Tip: If spreadsheet cells contain line breaks, check how the source wrote them. When the text arrives quoted, as "line1<newline>line2", this converter keeps the line break inside the value; unquoted line breaks start a new row.

Common mistakes

  • Pasting comma-separated data and getting one key: use CSV to JSON.
  • Pasting text where an editor or chat app converted tabs to spaces; there are then no tab delimiters left.
  • Expecting numbers, booleans or null.
  • Starting a value with a double quote (a measurement like 5") and getting a quote error or swallowed text.
  • Expecting \t written as two characters to become a tab.

Convert back with JSON to TSV, read comma-separated files with CSV to JSON, check the output with the JSON validator, or browse it in the JSON viewer.

Frequently asked questions

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser using JavaScript. Nothing you paste leaves your device, is logged, or is stored on a server.

How large a document can it handle?

The limit is your browser's memory rather than any server quota. Documents of a few megabytes convert without trouble; very large files may make the page briefly unresponsive while it works.

What happens to nested data?

Formats that have no concept of nesting store nested values as a JSON string inside the cell, so nothing is silently discarded and the structure can be recovered.

Does it handle quotes and commas inside fields?

Yes. Parsing follows RFC 4180, so quoted fields containing commas, escaped double quotes, and line breaks inside a field are all read and written correctly.

Sources

  1. IANA — Media type text/tab-separated-values — Records are lines, fields are separated by tabs, the first line names the fields, and fields containing tabs are not allowable.
  2. IETF — RFC 4180, Common Format and MIME Type for CSV Files — The quoting convention this tool applies to tab-separated text as well.
  3. IETF — RFC 8259, The JSON Data Interchange Format

This guide explains published rules in plain language. It is not financial, legal or official advice — rules change, so confirm with the agency linked above before you commit.

Related tools