free tool · no sign-up · runs in your browser

CSV to JSON converter

Paste a CSV, or cells copied from Excel, Google Sheets or Numbers. The first row becomes the keys and every other row an object. Numbers, true and false come out as real JSON values instead of strings, empty cells as null, and a column named address.city can become a nested object.

paste here

result

2 objects, read as CSV

On a Mac? Skip this tab next time. Pastely does it in any app: copy, press ⌘⇧V, and it pastes in the format that app needs.

Download Pastely free

Free to embed. Put this csv to json on your blog, docs or class page.

What the options change

CSV cellDetect types offDetect types on
42"42"42
3.5"3.5"3.5
true"true"true
(empty)""null
01234"01234""01234" (leading zero kept)

Nesting with dotted headers

Name your columns with dots and they nest: a header row of id,user.name,user.email gives {"id": 1, "user": {"name": "Ada", "email": "…"}}. It's the reverse of how the JSON to CSV converter flattens, so a round trip gets you back where you started.

Converting in code

Python: pandas.read_csv("data.csv").to_json(orient="records"). Node: read the file and split it, or use a CSV parser such as csv-parse for quoted fields and line breaks inside cells.

CSV to JSON: questions

Why do my numbers come out as strings?+

In a CSV everything is text. With detect types on, cells that look like numbers, true or false become JSON numbers and booleans. Values with a leading zero, like the ZIP code 01234, stay strings so the zero isn't lost.

What does nest dotted keys do?+

Columns named user.name and user.email become one nested object: {"user": {"name": …, "email": …}}. It's the reverse of what the JSON to CSV converter does.

How do I convert Excel or Google Sheets to JSON?+

Select the cells, including the header row, copy, and paste them here. Spreadsheets copy cells as tab-separated text, which is read as columns.

Is my file uploaded?+

No. The conversion happens in your browser.

More free tools

Paste as Plain Text

Strip fonts, colours and links from copied text, and the invisible characters too.

Remove Line Breaks

Fix text copied from a PDF: join broken lines back into paragraphs.

Case Converter

UPPER, lower, Title, Sentence, camelCase, snake_case and more in one click.

Word Counter

Words, characters, sentences, paragraphs and reading time as you type.

JSON Formatter

Format, validate and minify JSON, and fix trailing commas and single quotes.

Markdown Table Generator

Paste cells from Excel, Google Sheets or a CSV and get a Markdown, HTML or JSON table.

Remove Duplicate Lines

Dedupe, sort, trim and clean up any list in one paste.

Clipboard Viewer

See everything on your clipboard: plain text, HTML, images and hidden formats.

Mac Copy & Paste Shortcuts

Every copy, paste and screenshot shortcut on a Mac, searchable.

Paste Into Google Sheets

Turn any copied table, list or CSV into columns that paste straight into Sheets or Excel.

Table Converter

Convert tables between HTML, Markdown, CSV, TSV and JSON, in any direction.

JSON to CSV

Turn a JSON array into CSV or spreadsheet cells, nested objects flattened.

ChatGPT Text Formatter

Fix the asterisks and hashes when you paste ChatGPT text into WhatsApp, Slack or a plain text box.

Markdown to Rich Text

Copy Markdown as real formatting for Google Docs, Gmail, Word and Notes.

Rich Text to Markdown

Paste from Google Docs, Word or a web page and get clean Markdown.

JSON to TypeScript

Generate TypeScript interfaces from a JSON sample, optional fields included.

JSON to Swift

Generate Swift Codable structs from JSON, with CodingKeys for snake_case.

Character Counter

Count characters for X, Instagram, meta tags and SMS, including how many texts a message costs.

Sort Alphabetically

Sort any list A to Z, Z to A, by length or in natural number order.