CSV ↔ JSON Converter
Delim
Output
Indent
CSVInput
6 lines · 292 B
JSON
[
  {
    "id": 1,
    "name": "Alice Johnson",
    "email": "alice@example.com",
    "department": "Engineering",
    "salary": 95000,
    "active": true
  },
  {
    "id": 2,
    "name": "Bob Smith",
    "email": "bob@example.com",
    "department": "Marketing",
    "salary": 72000,
    "active": false
  },
  {
    "id": 3,
    "name": "Carol White",
    "email": "carol@example.com",
    "department": "Engineering",
    "salary": 88000,
    "active": true
  },
  {
    "id": 4,
    "name": "Dan Brown",
    "email": "dan@example.com",
    "department": "HR",
    "salary": 65000,
    "active": true
  },
  {
    "id": 5,
    "name": "Eve Davis",
    "email": "eve@example.com",
    "department": "Marketing",
    "salary": 78000,
    "active": false
  }
]
5 rows · 6 cols · 761 B

CSV to JSON Converter Free — JSON to CSV Online with Type Inference & Table Preview

Updated May 14, 2026
Share & Support

What's included

Features

Bidirectional: CSV → JSON and JSON → CSV with single click
Auto-detect input format — JSON detected by leading [ or {, everything else treated as CSV
Type inference — "42" → 42, "true" → true, "" → null, automatic for cleaner JSON output
Table Preview tab — HTML table with color-coded numbers, booleans, and null values
Delimiter support: comma, semicolon, tab/TSV, pipe, and auto-detect mode
RFC 4180 compliant CSV parser — quoted fields, embedded commas, embedded newlines
Output modes for CSV→JSON: Objects [{}] (default) or Arrays [[]]
Header row toggle — use or ignore the first CSV row as column names
Quote all fields option for CSV output (useful for strict RFC 4180 compliance)
Indent selector: 2 or 4 spaces for JSON pretty-print
Copy output to clipboard with ✓ feedback; download as .json or .csv — paste the JSON output into the JSON Dashboard Generator to visualize numeric fields as charts immediately
Swap button — use output as new input for round-trip testing
Per-panel stats: rows, columns, byte size
100% client-side — no server, no account, works offline

About this tool

Convert CSV to JSON or JSON to CSV Instantly — No Install, No Sign-Up

You have a spreadsheet export you need as JSON for an API. Or an API response you need to open in Excel. Or a database export in CSV that needs to become a JSON seed file. Paste it here and get the converted output instantly — no file upload, no server, no account.

The input direction is auto-detected by looking at the first non-whitespace character: a leading [ or { is treated as JSON, anything else is parsed as CSV. CSV → JSON: the parser is a hand-written character-by-character state machine, not a regex split — it tracks whether it is inside a quoted field so delimiters and newlines embedded in quotes are ignored, and it un-escapes doubled "" into a single literal quote, matching RFC 4180 exactly. Type inference is on by default: numeric strings become real numbers, "true"/"false" become booleans, and empty strings, the literal "null", or "N/A" all become JSON null — so downstream code doesn't have to special-case string "42" versus number 42.

JSON → CSV: paste a JSON array of objects and the tool walks every object first to collect the full union of keys in first-seen order, then emits one column per key — objects missing a key simply get an empty cell rather than breaking the conversion. If every element is itself an array rather than an object, it switches to a positional col1, col2… header scheme instead. Nested objects or arrays inside a field are serialized inline as JSON text rather than dropped.

Delimiter handling covers comma, semicolon (common in European CSV exports where comma is the decimal separator), tab (what you get pasting directly from Excel or Google Sheets), and pipe, plus an Auto mode that counts occurrences of each candidate character across the first 2000 characters of input and picks the most frequent one.

The Table Preview renders up to 200 rows as a live HTML table with numbers in orange, booleans in purple, and nulls shown as a dash, so you can catch misaligned columns or a wrong type conversion before you copy or download. Everything — parsing, inference, and rendering — runs in your browser; nothing is uploaded, and there is no server-side file size limit beyond your own memory.

Step by step

How to Use

  1. 1
    Paste your CSV or JSON into the input panelPaste CSV data or a JSON array into the left input panel. The tool auto-detects the format — JSON is recognized by a leading [ or {, everything else is treated as CSV. Click CSV sample or JSON sample to load demo data. The conversion runs live and the output appears in the right panel instantly.
  2. 2
    Set the delimiter for CSV inputUse the Delim selector to choose the correct delimiter: comma (,), semicolon (;), Tab (TSV — use this when pasting from Excel or Google Sheets), or pipe (|). Auto mode counts which delimiter appears most frequently in the first 2000 characters. Override it manually if auto-detect gets it wrong.
  3. 3
    Configure CSV-to-JSON optionsWhen converting CSV → JSON, use the option strip: First row = headers (on by default) treats row 1 as column names. Infer types (on by default) converts "42"42, "true"true, ""null. Output toggle: [ {} ] produces an array of objects (best for APIs), [ [] ] produces an array of arrays (more compact). Indent sets the JSON pretty-print width (2 or 4 spaces).
  4. 4
    Configure JSON-to-CSV optionsWhen converting JSON → CSV, enable Quote all fields to wrap every value in double-quotes regardless of content — useful for strict RFC 4180 compliance with downstream parsers. All unique keys across all JSON objects become column headers automatically; missing keys produce empty cells.
  5. 5
    Check the Table PreviewClick the Table tab in the output panel to see your data as a styled HTML table. Numbers appear in orange, booleans in purple, and null/empty values show as a dash. Use this to visually verify column alignment, type conversions, and data quality before copying or downloading. The preview shows up to 200 rows.
  6. 6
    Copy, download, or swapClick Copy in the output panel to copy the result to your clipboard (a ✓ feedback appears). Click Download to save as .json or .csv depending on the output format. Click the ↔ swap arrows to copy the output back into the input and flip the direction — useful for round-trip testing.

Real-world uses

Common Use Cases

📊
Convert a spreadsheet export to JSON for a REST API or database
Export Google Sheets or Excel data as CSV, paste it here, and get a JSON array ready to POST to a REST API, insert into MongoDB, or seed a development database. Type inference converts numeric columns to actual numbers automatically. Inspect the result as a sortable table with the JSON table viewer.
🗄️
Convert a database CSV export to JSON for a Node.js app
Paste a PostgreSQL, MySQL, or SQLite CSV export and get a JSON array ready for ingestion into a Node.js app, Elasticsearch index, or JSON document store.
🔌
Open an API response in Excel or Google Sheets
Paste a JSON array from an API response and download the CSV — open it directly in Excel or Google Sheets for analysis, pivot tables, or charting without writing any code. Or skip the CSV step entirely and paste the JSON into the JSON Dashboard Generator to get bar, line, and pie charts with live filters in seconds.
🧪
Create and maintain test fixtures as readable CSV
Write test data as human-readable CSV, convert to JSON for unit and integration tests, or convert JSON mock data to CSV for loading into test databases. Round-trip with the Swap button.
📋
Verify data quality before loading it into a pipeline
Use the Table Preview to visually inspect converted data — spot type mismatches, unexpected empty columns, and misaligned fields before committing to a data pipeline or API call.
📁
Edit JSON config arrays as a spreadsheet
Convert JSON configuration arrays (feature flags, routing rules, A/B test variants, user roles) to CSV, edit in a spreadsheet, convert back to JSON. The round-trip preserves types correctly with type inference enabled.

Got questions?

Frequently Asked Questions

Paste CSV into the input panel — the tool auto-detects it and outputs a JSON array with column headers as keys. Enable "Infer types" to auto-convert numbers and booleans.

Paste a JSON array of objects. The tool detects the leading [ and converts each object to a row, using all unique keys as column headers.

A live HTML table view of the converted data. Numbers show in orange, booleans in purple, and nulls as dashes. Useful for spotting misaligned columns or unexpected type conversions.

"42" → 42, "3.14" → 3.14, "true" → true, "false" → false, "" or "null" → null. Disable it to keep all CSV values as strings.

[ {} ] produces an array of objects with named keys — best for APIs and databases. [ [] ] produces an array of arrays without key names — more compact for matrix processing.

Yes — select the Tab delimiter. TSV is what you get when copying cell ranges from Excel or Google Sheets.

All unique keys across all objects become columns. Objects missing a key get an empty cell for that column.

Yes — it is RFC 4180 compliant. Fields containing commas, double-quotes, or newlines are handled correctly when wrapped in double-quotes.

Free, no sign-up, 100% client-side. Your data never leaves your browser.

Wraps every CSV output value in double-quotes regardless of content. Use when your downstream parser requires strict RFC 4180 quoting.