[
{
"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
}
]CSV to JSON Converter Free — JSON to CSV Online with Type Inference & Table Preview
What's included
Features
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
- 1Paste 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. - 2Set 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. - 3Configure 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). - 4Configure 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.
- 5Check 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.
- 6Copy, download, or swapClick Copy in the output panel to copy the result to your clipboard (a ✓ feedback appears). Click Download to save as
.jsonor.csvdepending 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
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.