Convert TSV to JSON
Convert TSV to JSON (and back) with type inference, headers toggle, empty-cell strategy, pretty-print. Free, offline, client-side, instant, secure.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Convert tab-separated to JSON (and back) with actual type inference - numbers become numbers, booleans become booleans, "null" becomes null, everything else stays a string. Three empty-cell strategies. Pretty-print toggle. Reverse direction infers headers from JSON object keys.
How to Use Convert TSV to JSON
- Paste your TSV data. First row should contain column headers (unless you turn off "First row is headers" - in which case the output is an array of arrays). Each subsequent row is one data record with tab-separated values.
- Toggle type inference. On (default):
"30"becomes the number 30,"true"becomes the boolean true,"null"becomes null, everything else stays a string. Off: every value stays a string. Strict numeric regex (no commas, no spaces, no multiple dots) - values like"1,000"stay strings because of locale ambiguity. - Choose empty cell strategy. Three options: empty string (default - empty cells become
""), null (empty cells become JSONnull), or omit (the key is not included in the object at all). "Omit" is useful when receiving systems treat missing keys differently from null. - Toggle pretty-print. On: 2-space indented multi-line JSON, easy to read. Off: minified single-line JSON, smallest payload size for transmission.
- Read the JSON output. Format depends on toggles: with headers, an array of objects (
[{"name":"Alice","age":30}]); without headers, an array of arrays ([["name","age"],["Alice",30]]). Stats show row/column/value counts plus type distribution. - Swap for reverse. ⇄ flips to JSON → TSV. Accepts either an array of objects (headers inferred from union of all object keys in order of first appearance) or an array of arrays (output as rows directly). Nested objects/arrays get JSON-stringified into a single TSV cell.
- Stats summarize the types. When type inference is on, you see how many values were parsed as strings vs numbers vs booleans vs nulls. Useful sanity check - if your "age" column shows up as 0 numbers and 100 strings, you have a parsing issue.
Frequently Asked Questions
Does it really detect numbers, booleans, and null correctly?
Yes – that’s the type inference. "42" becomes the JSON number 42, "3.14" becomes 3.14, "1e3" becomes 1000, "true"/"True"/"TRUE" all become boolean true, "null" becomes JSON null. The regex for numbers is strict – no commas allowed (locale ambiguity), no spaces, no multiple dots. Values like "1,000" or "$30" stay strings because they’re not unambiguous numbers.
What does the empty cell strategy actually do?
Three options: (1) Empty string: empty cells become "" – the key is present, value is empty string. (2) null: empty cells become JSON null – clearer “no value” signal. (3) Omit: the key is removed from the object entirely. So {"name":"Alice","age":""} becomes {"name":"Alice","age":null} or {"name":"Alice"} depending on which you pick. Useful when receiving systems treat these cases differently.
Can I convert without headers?
Yes – turn off “First row is headers”. Output becomes an array of arrays where each row is one inner array: [["name","age"],["Alice",30],["Bob",25]]. Type inference still applies to individual values. Useful when your TSV genuinely has no header row, or when you want headers preserved as data rather than as keys.
What’s the difference vs CSV to JSON?
TSV uses tab separators with no quoting convention, so the parser is simpler – just split each line on tab characters. CSV has RFC 4180 escaping rules for embedded commas/quotes/newlines, which requires a stateful parser. If your data has fields with embedded tabs, TSV won’t work – you’d need CSV. If your data has clean tab-separated fields, TSV is faster to parse and the input is more compact.
How does reverse direction (JSON → TSV) infer the headers?
For an array of objects, headers are the union of all object keys in order of first appearance. So [{"a":1},{"a":2,"b":3}] produces headers a then b – keys that appear later still make it into the header row. For an array of arrays, no headers are inferred; rows go straight to output. Nested objects/arrays get JSON-stringified into a single TSV cell.
What about decimal commas like “1,000” or “3,14”?
They stay strings. The number regex doesn’t accept commas because locale rules differ – US uses 1,000 for one thousand, Europe uses 1.000. Rather than guess, the tool preserves the original. If you want them as numbers, pre-process your TSV to use standard decimal points before pasting.
Are nested JSON objects supported in reverse?
They’re JSON-stringified into a single TSV cell. So [{"name":"Alice","address":{"city":"NYC"}}] becomes nametaddressnAlicet{"city":"NYC"}. TSV can’t represent nested structure natively, but stringifying preserves the data so a round-trip through both directions is possible if you parse the address cell as JSON afterwards.
What’s the input size limit?
500,000 characters. That’s typically 10,000+ rows of moderate-width data. Beyond that, browsers slow down for the JSON.stringify step and the textarea rendering. Hit the cap and you get a specific error pointing to the limit.
Is my data uploaded anywhere?
No. All parsing, type inference, JSON serialization run in your browser. Open DevTools → Network and confirm zero requests fire – even when you Convert or Download. Safe for proprietary datasets, customer lists, configuration data, or anything you’d rather not send to a third-party converter.
Does it work offline?
Yes. Total bundle is about 20 KB. Load once, disconnect, keep using. Pure JavaScript – no library dependencies (no Papa Parse, no jq), no fonts, no analytics. Useful for converting data on airgapped systems or in environments where you can’t share data with external tools.
Related Tools
Convert JSON to TSV →
Convert JSON to TSV with real tab/newline escaping. Nested flattening, header union, bidirectional. Free,…
Analyze JSON Online and Validate JSON Structure →
Analyze JSON Online Validate & Analyze JSON Structure with detailed statistics including depth, key…
Capture JSON Screenshot Generator →
Capture JSON Screenshot and Render pretty-printed JSON as a syntax-highlighted PNG screenshot - dark…
Censor JSON And Redactor →
Censor JSON and Redact passwords, tokens, and PII in JSON with asterisks, [REDACTED], or…
Base64 to JSON Decoder →
Decode Base64 to pretty-printed JSON - URL-safe variant, sort keys, indent 2/4/tab/minified. Free, client-side,…
Convert JSON to Base64 →
Encode JSON to Base64 or decode back. Standard / URL-safe / no padding. Pretty/minified/sorted.…
Convert JSON to Bson →
Real BSON encoding per bsonspec.org - int32/int64/double types, embedded docs, arrays. Bidirectional. Free, offline,…
Convert JSON to Image →
Render JSON as a syntax-highlighted PNG/JPEG with 6 themes, custom fonts, line numbers. Free,…
Convert JSON to Properties →
Convert JSON to Java .properties with real escaping (RFC-correct keys/values). Bidirectional. Spring-style arrays. Free,…
Convert JSON to Text →
Convert JSON to plain text - pretty, dot-path, indented tree, YAML-like, or numbered outline.…
Edit JSON →
Edit a JSON value by dot/bracket path, format or minify, indent 2/4 spaces. Live…
Escape JSON →
JSON-escape a string for embedding inside another JSON value or code literal - with…