TontonTools

CSV to JSON

Convert CSV to JSON — spreadsheet rows into arrays of objects.

100% Free No signup Privacy-friendly Web Development
Updated Sep 2026

Share X / Twitter Facebook LinkedIn WhatsApp

How to use CSV to JSON

  1. Paste your CSV — including the header row, which becomes the JSON keys.
  2. Read the JSON array — one object per row, quoted values unwrapped correctly.
  3. Check value types — CSV is text, so numbers and booleans may need casting where types matter.
  4. Copy into your code, API call or import — or explore it first in the JSON Viewer.

What is CSV to JSON?

A CSV to JSON converter turns comma-separated rows into an array of JSON objects: the header row supplies the keys, and each data row becomes one object. A two-column CSV of names and ages becomes [{"name":"Ada","age":"36"}, …] — the shape every API, script and JSON tool expects.

It's the spreadsheet-to-code bridge, opposite direction from JSON-to-CSV: data lives its first life in Excel or Sheets (exports, catalogs, mappings, hand-maintained lists) and needs a second life as structured input to programs. The converter does the reshaping plus the part humans botch — CSV's quoting rules for commas and quotes inside values.

About the CSV to JSON

Paste CSV — straight from a file or copied from a spreadsheet — and get the JSON array instantly, headers as keys, quoting and escaping handled.

Everyday conversions: a product/user/inventory sheet into seed data or API payloads, a colleague's Excel list into a config array, survey exports into JSON for analysis tooling, and lookup tables (country codes, category mappings) into structures code can import. The header row matters — its exact texts become the keys, so clean headers (lowercase, no spaces) upstream save renaming downstream.

The type caveat: CSV is untyped text, so values arrive as strings — "36" not 36, "true" not true. Converters may infer obvious numbers; when types matter (APIs validating payloads), verify and cast. Delimiter kin: semicolon-separated files (European Excel) and TSV convert the same way once the delimiter is known.

Frequently Asked Questions

The object keys, verbatim — a "First Name" column yields "First Name" keys. Rename headers to code-friendly forms (first_name) before converting if the JSON feeds a program.
CSV has no types — everything is text, so faithful conversion produces "42". Cast in consuming code, or accept string types where the consumer tolerates them. Auto-inference exists but guesses (ZIP codes becoming numbers lose leading zeros).
Via CSV quoting: "Smith, John" arrives as one value because it was quote-wrapped in the CSV. Properly exported CSV converts cleanly; hand-built CSV with unquoted commas shifts columns — fix the source.
European-locale Excel exports semicolon-delimited "CSV" (comma being the decimal mark). Same conversion once the delimiter is recognized — or re-export as proper CSV/TSV.
Empty cells become empty-string values (or null, by convention); rows shorter than the header get missing keys or empties. Consistent rectangles convert cleanest — worth a spreadsheet tidy-up first.

We use cookies for analytics and to keep the tools free via ads. See our Privacy Policy.