b2KIT

TSV to JSON Converter

Convert tab-separated value files to structured JSON with automatic type inference.

Tested tool guide Tested browser tools Checked August 16, 2026

What TSV to JSON Converter does, with a checked example

A TSV file is a table: one row per line, one column per tab. Paste one into this page and the output is the same data as JSON - an array of objects, with the first row supplying the key names and each later row contributing one object. Values are typed as they pass through: a cell that reads as a whole number, a decimal, or the word true or false becomes a JSON number or boolean; everything else stays a string. The usual surprise is inference judging appearance only - an identifier like 02138 can come out as a number and lose its zero.

Worked example

A concrete input and expected output from the current implementation.

Input

name	age	height_m	active
Ada	36	1.63	true
Grace	45	1.52	false

Expected output

[
  { "name": "Ada", "age": 36, "height_m": 1.63, "active": true },
  { "name": "Grace", "age": 45, "height_m": 1.52, "active": false }
]

Each data row becomes one object keyed by the header row, in file order. Cells that parse as integers, decimals, or the words true and false are promoted to JSON numbers and booleans; the names stay strings.

How the result is produced

1

Rows become records

The converter splits the pasted text on newlines into rows and on tab characters into cells; commas and quotes are ordinary characters, never delimiters. The first row supplies the key names, and each following row is paired cell-by-cell against those keys into one object. Every data row becomes one object, and the objects are gathered into a JSON array in file order.

2

Per-cell type inference

Each cell is decided on its own, without consulting the rest of the column. If the whole cell parses as a JSON number - optional minus sign, digits, at most one decimal point - it becomes a number; the exact words true and false become booleans; anything else stays a string. A column can therefore mix 12, 12.5, and twelve freely.

Good uses

  • You exported rows from a spreadsheet or database client as TSV and a web app or API call needs the same data as JSON objects.
  • A survey or analytics export with mixed columns - counts, rates, on/off flags - becomes an array you can filter with jq or load into a script without hand-writing quotes and braces.
  • You keep a small table in a text file - mock users, config entries, test fixtures - and want updated JSON whenever the table changes, instead of editing JSON by hand.

Limits and checks

  • The output keys are the first row's cells, verbatim. Spaces, dots, or punctuation in a header are legal JSON but awkward in code, and duplicate or empty header cells produce duplicate or blank keys. Normalize headers before converting if the keys feed into code.
  • Inference looks at appearance: a cell like 02138 can come out as the integer 2138, while 1,000 stays a string because the comma is not a digit. Compare the output against the source column by column before you trust it, especially for identifier columns.
  • Rows that do not line up with the header - a missing final cell, an extra tab, a blank line - have no universal mapping, and behavior differs between converters. Confirm the row count matches the file and look at rows containing blanks before relying on the output.

Common questions

Will dates like 2025-12-01 or times like 14:30 stay intact?

Yes. Inference promotes only cells that parse cleanly as numbers or as the words true and false, and 2025-12-01 is neither, so it remains a string. Dashed phone numbers, ISO timestamps, and everything with letters behaves the same way. Only bare integers, decimals, and true/false change type.

I pasted a CSV by mistake - will it convert?

No, not usefully. The converter splits cells on tabs, so commas are ordinary characters. A comma-separated file arrives as one cell per line, meaning each whole line becomes a single value instead of separate columns. Export or save the data as TSV - most spreadsheets offer it - and paste that.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools