JSON to CSV Converter
The inverse tool — convert JSON arrays back to a CSV spreadsheet. Supports Array of Objects, Array of Arrays, and JSONLines input with nested object flattening.
Open toolHome › Tools › Developer Tools › CSV to JSON Converter
Convert CSV to JSON instantly. Paste or upload a CSV file and get Array of Objects, Array of Arrays, Keyed JSON, or JSONLines output — no sign-up, nothing stored.
CSV to JSON Converter takes any CSV file — from a spreadsheet export, database dump, CRM extract, or analytics platform — and turns it into structured JSON in one step. Paste your data directly or upload a file up to 20 MB. The converter processes everything on the server using PHP's native fgetcsv() function, which handles quoted fields, embedded commas, and escaped quotes correctly. Nothing is stored or logged after the response is sent.
Array of Objects (default): Each row becomes a JSON object with the header row as keys — [{"name":"Alice","age":"30"},{"name":"Bob","age":"25"}]. This is what most REST APIs and JavaScript applications expect.
Array of Arrays: Each row becomes a plain array of values — [["Alice","30"],["Bob","25"]]. Useful when consuming the data in code that already knows the column order.
Keyed JSON: The first column value becomes the object key — {"Alice":{"age":"30"},"Bob":{"age":"25"}}. Ideal for building lookup tables where you want to access rows by identifier.
JSONLines / NDJSON: One JSON object per line, no wrapping array — one line per row. Standard format for streaming ingestion, log pipelines, and ML training data.
The Auto delimiter option (default) counts occurrences of commas, tabs, semicolons, and pipes in the first 10 lines and picks the most common one. This handles most CSV and TSV files without any configuration. You can also force a specific delimiter, or enter a custom single character in the Advanced section.
Your CSV data is sent to the server only for the duration of the conversion and discarded immediately after. Nothing is written to disk, logged, or retained between requests.
Paste your CSV into the text area or upload a .csv/.tsv/.txt file (up to 20 MB). Choose your output format (Array of Objects is the default), then click "Convert to JSON". The result appears in the output panel with Copy and Download buttons.
Array of Objects uses the header row as keys — each row becomes {"name":"Alice","age":"30"}. Array of Arrays skips the key naming and outputs raw row values — [["Alice","30"]]. Use Array of Objects when your code needs to access values by field name; use Array of Arrays when you control the column mapping in code.
Yes. The tool accepts files up to 20 MB. Larger files are processed using PHP's stream-based fgetcsv() which reads line by line rather than loading the entire file into memory, so performance stays consistent even for large inputs.
Select "JSONLines" in the output format group before clicking Convert. The output will have one JSON object per line with no wrapping array — the NDJSON format used by Elasticsearch bulk API, Kafka Connect, and most ML training pipelines.
Yes — conversion happens server-side using PHP's native fgetcsv() function. Your CSV is sent over HTTPS and discarded immediately after the response is sent. Nothing is written to disk or retained between requests.
Yes. The Auto option (default) detects the delimiter automatically. You can also select comma, tab, semicolon, or pipe explicitly in the Advanced section, or enter any single character as a custom delimiter.
Correctly. PHP's fgetcsv() fully supports RFC 4180 — fields containing the delimiter character, newlines, or double quotes are enclosed in double quotes and parsed correctly. For example, "Alice, Bob" in a quoted field is treated as one value, not two columns.
Keep going
The inverse tool — convert JSON arrays back to a CSV spreadsheet. Supports Array of Objects, Array of Arrays, and JSONLines input with nested object flattening.
Open toolFormat and validate your converted JSON output — pretty-print or minify and confirm the structure is correct before using it in code or APIs.
Open toolConvert YAML config files to JSON — pairs with this tool for data pipeline work where config is YAML but the API expects JSON.
Open toolCompare two JSON arrays side by side — useful for verifying that a CSV-to-JSON conversion produced the expected output vs. a reference file.
Open tool