CSV to JSON Converter
Paste or upload a CSV file and get JSON output instantly. Auto-detects delimiter. Choose from four output formats including JSON Lines for MongoDB. Parse numbers, booleans and nulls automatically.
Four Output Formats
- Array of objects — the standard format. Each row becomes a JSON object with header names as keys. This is what most APIs and JavaScript applications expect.
- Keyed (col 1 as key) — the first column becomes the key of the top-level object. Instead of an array, you get a lookup object:
{"Amaka": {"age": 28, ...}}. Useful for building dictionaries or hash tables from CSV data. - JSON Lines (NDJSON) — one JSON object per line with no array wrapper and no commas between objects. This is the format used by MongoDB imports, log pipelines, and streaming data systems. Each line is independently parseable.
- Array of arrays — raw values in nested arrays, no header names. Useful when the consuming system provides its own schema or when you need the most compact possible representation.
Type Parsing
With "Parse numbers & booleans" enabled (the default), numeric strings like "450000" become numbers, and "true"/"false"/"null" become their JSON equivalents. This is almost always what you want when the JSON will be consumed by code. Disable it if you need to preserve the original string representation — for example, phone numbers with leading zeros or product codes that look like numbers.
"Empty → null" converts blank CSV cells to JSON null instead of empty strings "". Most databases and APIs treat these differently, so enable this if you need proper null semantics.
Delimiter Auto-Detection
The auto-detect option samples the first line and picks whichever separator appears most frequently outside of quoted fields — comma, semicolon, tab or pipe. It displays the detected delimiter in the stats row so you can confirm it found the right one. Override it manually if auto-detection gets it wrong on unusual files.