TSV to JSON Converter
Turn tab-separated data into a JSON array of objects: header cells become keys, numbers and booleans become real JSON values, and leading-zero codes stay strings.
TSV to JSON Converter
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Add your TSV
Paste it into the left box, press Open file, or drag a .tsv file onto it. Sample loads a realistic example.
Set the options
Adjust the options above the boxes — the output updates instantly as you change them.
Check the result
Read the status line: it reports rows, keys and any value that couldn't be represented in JSON.
Copy or download
Copy the JSON or download it as a .json file. Nothing was uploaded at any point.
Store codes like 00142 stay strings, so leading zeros are never lost.
Features
Header row or not
Use the first row as field names, or treat every row as data with generated column1, column2… names.
Real types, not just strings
Numbers, booleans and empty values are detected — while codes with leading zeros such as 00742 or +44 phone numbers stay text.
Rebuild nested objects
Headers like address.city can be folded back into nested objects instead of flat dotted keys.
Pretty or minified
2 or 4 spaces, tabs, or a minified single line for the smallest possible file.
Private by design
Parsing and conversion run in your browser with JavaScript — your data is never uploaded, logged or stored.
About the TSV to JSON Converter
TSV shows up whenever data comes off a clipboard or a database dump, and JSON is what APIs, JavaScript and NoSQL databases want. The conversion is row-to-object: the first line supplies the keys, and each following line becomes one object with a value per key.
With Detect numbers & booleans on, 42 and 3.5 become JSON numbers, true/false become booleans, and empty cells become null. Values that only look numeric — 00742, +44 20 7946 0958, a 16-digit card-style ID — stay strings, because converting them would corrupt them. Tick Nest dotted headers to turn geo.lat and geo.lng columns into a nested geo object.
If there's no header row, untick First row is the header and keys are generated as column1, column2… The JSON can be pretty-printed with 2 or 4 spaces or tabs, or minified for transport.
Examples
A store list exported from a database as TSV, with a leading-zero store code and dotted coordinate headers.
code city geo.lat geo.lng open
00142 Pune 18.5204 73.8567 true
00217 Mumbai 19.0760 72.8777 true
00305 Nashik 19.9975 73.7898 false[
{
"code": "00142",
"city": "Pune",
"geo": {
"lat": 18.5204,
"lng": 73.8567
},
"open": true
},
{
"code": "00217",
"city": "Mumbai",
"geo": {
"lat": 19.076,
"lng": 72.8777
},
"open": true
},
{
"code": "00305",
"city": "Nashik",
"geo": {
"lat": 19.9975,
"lng": 73.7898
},
"open": false
}
]This output was produced by the converter on this page with Nest dotted headers switched on — load it with the “Store list” preset above and change any option to see the effect.
How TSV maps to JSON
| In TSV | Becomes in JSON |
|---|---|
| Header row | object keys |
| Each line | one object in the array |
98.5, true | 98.5, true |
00742 | "00742" |
| Empty field | null |
geo.lat + Nest | "geo": {"lat": …} |
Things that trip people up
- Header with spaces. Keys are kept exactly, so
First Namebecomes the key "First Name". Rename headers first if your code expects first_name. - Duplicate headers. JSON objects can't hold two equal keys — the later column wins. Rename duplicates before converting.
- Big integers. Integers with 16 or more digits are kept as strings so JavaScript doesn't round them.
- Dates. Dates stay strings (JSON has no date type); parse them in your code.
TSV vs JSON at a glance
| Property | TSV | JSON |
|---|---|---|
| Specification | IANA text/tab-separated-values | RFC 8259 (2017) · ECMA-404 |
| File extension | .tsv / .tab | .json |
| Media type | text/tab-separated-values | application/json |
| Data types | text only | string, number, boolean, null, object, array |
| Comments | No | No |
| Nesting | None (flat rows) | Unlimited |
- TSV: The IANA definition has no quoting at all: a field simply may not contain a tab or a line break.
- JSON: Numbers are parsed as IEEE-754 doubles in JavaScript, so integers above 9,007,199,254,740,991 (2⁵³ − 1) lose precision.