TSV / Excel Paste to JSON

Convert tab-separated data pasted straight from a spreadsheet into JSON, with type inference and header handling.

Everything runs in your browser. A paste from a confidential spreadsheet never leaves your machine.

What It Does

Copy a block of cells from a spreadsheet and paste it here to get JSON. That works because what a spreadsheet actually puts on your clipboard is tab-separated text — not CSV, which is why pasting it into a comma-based converter collapses every row into a single column and looks broken. This expects tabs by default and handles the quoting spreadsheets apply to cells containing tabs or line breaks. Values are typed sensibly on the way out: numbers become numbers, true and false become booleans, empty cells become null, and anything with a leading zero stays a string because a postcode is not a quantity. The header row becomes the object keys, with duplicate names renamed rather than silently overwriting one another.

When to Use It

  • You have data in a spreadsheet and need it as JSON for an API request, a test fixture or a config file.
  • A colleague sent an Excel file and the values need to go into code without a manual retyping step.
  • You are building a seed file and the source data already exists as a sheet.
  • A report needs converting for a frontend that expects an array of objects.
  • You want to check what a spreadsheet's data looks like structurally before writing anything to consume it.

Worked Examples

name age active Jane 30 true Sam 25 false

A straight paste from three columns of a spreadsheet. Ages become numbers and the active column becomes real booleans rather than the strings "true" and "false".

sku qty 0071 5 0450 12

The leading-zero case. Both SKUs stay strings, because converting them to numbers would drop the zero and produce a code that no longer matches anything.

id note 1 2 Has a value

An empty cell becomes null rather than an empty string, which is usually what a consumer expects — and is a meaningful difference once the data reaches a database.

Features

Direct paste from Excel
Google Sheets and Numbers
Tab-separated by default with other delimiters available
Type inference for numbers
booleans and nulls
Leading-zero codes preserved as strings
Header row becomes object keys
Duplicate headers renamed rather than overwritten
Array-of-arrays output when there is no header
Pretty or minified JSON
Row and column counts reported
Runs entirely in your browser

How to Use

1. Select cells in your spreadsheet and copy them. 2. Paste directly into the input box — no export or file needed. 3. The JSON appears immediately below. 4. Turn off type inference if the receiving system expects every value as a string. 5. Copy the result, or switch to minified output for a compact payload.

Common Mistakes

  • Pasting spreadsheet data into a comma-based converter. The clipboard carries tabs, so every row arrives as one long column and the output looks nothing like the sheet.
  • Assuming leading zeros survive the spreadsheet. Excel converts them to numbers on entry unless the column was formatted as text first, so the loss often happens before the data ever reaches a converter.
  • Leaving inference on when the consumer expects strings. A field typed as a number where an API wanted a string is a validation error at the far end of the pipeline.
  • Ignoring duplicate column headers. In an object they would silently overwrite each other, so they are renamed — but the renamed key is probably not what your consumer expects.
  • Round-tripping multi-line cells through the clipboard. Different spreadsheets quote them differently; exporting a real file is more reliable when the data has line breaks in it.

Frequently Asked Questions

Explore related topics

#JSON