TSV to JSON Converter

Paste cells copied from a spreadsheet and get a JSON array of objects keyed by the header row.

TSV
JSON
Runs locally in your browser

About the TSV to JSON Converter

The fastest way to get spreadsheet data into code is to copy the cells and convert the clipboard text. Spreadsheets put tab-separated text on the clipboard, and this converter reads it directly: the first row becomes the keys, each following row becomes an object, and numbers and booleans are typed unless you turn that off.

Because the delimiter is fixed to tab, commas in cells such as "Cork, Ireland" never cause a split, which is a common failure when people paste spreadsheet data into a CSV tool. A blank cell arrives as an empty string rather than being dropped, so every object keeps the same shape and your code can rely on the key existing.

Typing is the option to think about. With it on, 42 becomes a JSON number and true a boolean, which is almost always what you want. The rules are deliberately cautious: a value with a leading zero such as 007 stays a string, and so does anything sixteen digits or longer, so product codes and long identifiers keep every character instead of losing precision to a floating-point number. What it will still convert is a column of numeric-looking references with no leading zero, so if a field must stay textual, turn typing off and cast the columns you actually want in your own code.

A practical run: highlight a range in Sheets including the header, paste it here, and the JSON is ready for a fixture or a seed script seconds later. For other JSON shapes, arrays of arrays or column-keyed objects, or for semicolon and comma delimited files, the CSV to JSON tool offers more options, and JSON Formatter tidies the result afterwards.

How to use

  1. Copy a range in Excel or Sheets, including the header row, and paste it on the left.
  2. Choose whether values should be typed.
  3. Copy the JSON into your code.

Common questions

Does it work with Google Sheets?
Yes. Sheets copies tab-separated text, which is exactly what this tool reads.
Can I get an array of arrays instead of objects?
Use CSV to JSON with the tab delimiter and choose the array shape.
What if my data has no header row?
Untick the header option; keys become column1, column2 and so on.