tsvkit.org
TSV Toolkit
Sample data Say hi →

TSV to JSON

array of objects · strings by default · optional type coercion

Turn a TSV into a JSON array of objects, one per row, keyed by the header. Values stay strings unless you explicitly ask for coercion — which matters more than it sounds, because automatic typing is how 00742 becomes 742 and a version number 1.10 becomes 1.1. You opt into that, rather than discovering it later.

tsv → json
Drop a .tsv file here, or
ready

How to use

  1. Paste or drop the TSV. The header row supplies the JSON keys.
  2. Leave coerce types off unless you want numbers and booleans as JSON scalars — see below.
  3. Toggle pretty-print for indented output, or leave it off for the compact single-line form.
  4. Copy or download as .json.

Coercion, and what it costs

With coercion on, a value that looks like a number becomes a JSON number, true and false become booleans, and the literal null becomes null. That's what you want when the JSON feeds code that will do arithmetic.

The casualties are identifiers that happen to be digits: zip codes and account numbers lose leading zeros, IDs longer than 15 digits lose precision because JSON numbers are IEEE 754 doubles, and 1.10 loses its trailing zero. If your file has any such column, leave coercion off and cast in the consuming code, where the decision is explicit and reviewable.

Array or JSONL?

This page produces a single JSON array, which is right for an API payload, a config file, or anything a browser will fetch and parse in one go. For bulk loaders, log pipelines, and fine-tuning APIs, the newline-delimited form is what's expected — that's TSV → JSONL, where each line is an independent object and a corrupt line costs you one record instead of the whole file.

FAQ

Can it produce nested JSON?

No — output is flat, one key per column. A header like address.city comes through as a literal dotted key, which some consumers interpret as a path; genuine nesting needs a script.

What if two columns have the same name?

The later one wins, because a JSON object can't hold duplicate keys — and it happens silently. Run header tools with make duplicate names unique first if you're not sure.

How are empty cells represented?

As empty strings, or as null if the cell literally contains null and coercion is on. TSV can't distinguish a missing value from an empty one, so nothing else would be honest.

Is there a size limit?

Browser memory. Live conversion pauses above roughly 5 MB of pasted text; drop the file instead and it processes in one pass.

Privacy

100% client-side. No upload. See the privacy policy.