CSV ⇄ JSON Converter Pro

Professional CSV↔JSON with header detection, custom delimiters, and fast parsing

Input

Advanced settings

Output

Run Convert to generate output.

CSV ⇄ JSON Converter Pro

Professional CSV↔JSON with header detection, custom delimiters, and fast parsing

Features

  • Bidirectional CSV ↔ JSON conversion with configurable delimiter (comma, tab, semicolon, pipe) and quote character (default ") — handles RFC 4180-compliant CSV including escaped quotes ("" inside quoted fields)
  • Header-row detection toggle: when on, the first CSV row becomes JSON object keys; when off, output is an array-of-arrays. Sets the right default for spreadsheet exports vs raw tabular data
  • Type inference toggle: integers, floats, booleans (true/false), and null literals get converted to their JSON types instead of stayed as strings — useful for JSON consumers that distinguish 1 from "1"
  • Multi-line field support: cells wrapped in quotes can contain commas, newlines, and quote characters (escaped as "") and round-trip cleanly through both directions
  • Auto-detect mode sniffs which format the pasted text is and runs the conversion in the opposite direction, no manual mode switch needed
  • Error reporting names the row and column of malformed input — unterminated quotes, mismatched field counts per row, etc. — so you can fix CSV by hand instead of guessing
  • Copy and download emit the result with consistent line endings (LF by default; CRLF available for Windows targets) ready to drop into a spreadsheet, database import, or HTTP request body
  • Pure client-side: parsing happens in your browser via a tiny RFC-4180 state machine. Nothing is uploaded, works offline once cached

How to use

  1. Paste either CSV or JSON into the input pane. With Auto-detect on, the tool sniffs and converts to the opposite format.
  2. Adjust the delimiter (comma/tab/semicolon/pipe) to match your CSV. Most spreadsheet exports use comma; European locales often use semicolon.
  3. Toggle "first row is header" to control whether JSON output is an array-of-objects or array-of-arrays.
  4. Toggle "infer types" to convert numeric/boolean/null literals to their JSON-native types instead of leaving them as strings.
  5. Click Convert. The output pane shows the result; errors show with row/column references.
  6. Use Copy or Download to grab the result.

Tips & Best Practices

  • Always verify type inference with a small sample first: an unwanted boolean conversion of `T` → `true` in a US-state column can silently corrupt your data.
  • For Excel imports, set the delimiter to comma and enable the header-row toggle; for SAP/SQL exports, semicolon is often safer.
  • Round-trip your CSV through JSON and back to confirm escaping handles your edge cases before bulk-importing.
  • Use auto-detect for mixed workflows; explicit mode when you're processing batches and want consistent error behavior.
  • For JSON → CSV with nested structure, run the JSON through a flattening transform first (JSON Formatter's "flatten" or your own code) so each row stays one-dimensional.

FAQ

Why is my CSV being parsed with everything-as-strings?

CSV has no concept of types — every field is a string. With "infer types" off, JSON output mirrors that (every value is a string). Turn the toggle on if your JSON consumer needs `42` instead of `"42"`. Inference rules: matches an integer regex → number; matches a float regex → number; literal true/false → boolean; literal null/empty → null (only when configured).

What about CSV fields containing commas or newlines?

Per RFC 4180, fields containing delimiters or newlines must be wrapped in double quotes, and any literal double quotes inside the field are escaped as "". The parser handles this correctly. If your CSV uses some other quoting convention (e.g., backslash-escape), preprocess it to RFC 4180 first.

What's the difference between semicolon and comma delimiters?

Excel in European locales (German, French, Spanish) defaults to semicolon because comma is the decimal separator in those languages. US/UK Excel uses comma. The parser doesn't auto-detect — pick the delimiter that matches your source.

Can I convert nested JSON to CSV?

Only flat JSON (arrays of objects with scalar values) converts cleanly to CSV. Nested objects/arrays get JSON.stringify'd into a single CSV cell — the result is valid but ugly. For deeply nested JSON, write a flattening function in your code and feed the flat result here.

Why does my Excel-exported CSV produce a weird first column?

Excel often prepends a UTF-8 BOM (`EF BB BF`) to CSV exports for encoding detection on Windows. The parser handles this — the BOM is stripped before parsing. If the first column header looks like `?Name` instead of `Name`, you have a non-UTF-8 BOM (UTF-16 LE/BE) from older Excel versions; re-export as UTF-8.

Are blank rows handled?

Yes — empty lines between records are skipped, not parsed as zero-field records. If your CSV has intentional blank rows you need preserved, they'll be dropped here.

Is anything sent to a server?

No. CSV parsing and JSON serialization both run in your browser. Network tab shows no requests during conversion.

How big can the input be?

Practical limit ~50k rows before the UI thread pauses noticeably. For million-row datasets, use a CLI tool (csvkit, miller, jq + custom script) — this tool is for ad-hoc conversion, not ETL pipelines.