CSV to JSON
Turn CSV rows into a JSON array of objects
- 100% Free
- Files stay private
- Works in your browser
Everything runs in your browser. Quoted values keep embedded commas, quotes and line breaks intact; blank lines are skipped.
How it works
Paste your CSV
Paste your CSV rows into the CSV input box. The JSON output updates live as you type or edit.
Set delimiter and header
Pick the column Delimiter, then choose Objects or Arrays under First row is a header to shape the JSON.
Copy or download the JSON
The JSON output appears with Rows, Columns and Size counts. Press Copy, or Download to save it as a file.
Turn CSV rows into clean JSON in real time (as an array of objects keyed by your header row, or a raw array of arrays) with delimiter and indent controls, all in your browser.
What is CSV to JSON?
CSV to JSON is a free online converter that reads comma-separated (or otherwise delimited) data and outputs structured JSON. With the header option on, each row becomes an object keyed by the column names; with it off, you get a plain array of arrays that mirrors the raw grid. A robust, quote-aware parser handles the messy realities of real CSV. It matters because moving spreadsheet-style data into apps, APIs and config almost always means converting it to JSON first.
Who Benefits from This Tool
- Developers: convert a CSV export into a JSON fixture or seed file for an app.
- Data analysts: feed spreadsheet data into JSON-based tools and notebooks.
- API integrators: reshape a downloaded report into a request body.
- Marketers and ops teams: transform contact or product lists into a platform's expected format.
- Students: see how tabular data maps onto JSON objects and arrays.
Key Features
- Header toggle: output an array of objects keyed by the header row, or an array of arrays.
- Quote-aware parser: handles quoted fields, escaped "" quotes and embedded commas or line breaks.
- Delimiter picker: comma, semicolon, tab, pipe or space.
- Indent control: pretty-print with 2 spaces, 4 spaces, a tab, or minified output.
- Blank-line handling: empty lines are skipped automatically.
- Live stats: row, column and output size update as you type.
- Copy and download: save the JSON as a .json file in one click.
How to Use
- Choose your delimiter and JSON indent.
- Set whether the first row is a header (Objects) or not (Arrays).
- Paste your CSV, or click Try sample to load an example.
- The JSON is generated live; check the row, column and size stats.
- Copy the output or download it as a .json file.
Common Use Cases
- Converting a spreadsheet export into a JSON array for a web app or API.
- Turning a database CSV dump into seed data for a project.
- Reshaping a semicolon- or tab-delimited file into JSON.
- Preparing test fixtures from a small hand-written CSV.
- Extracting a raw array-of-arrays grid when column names don't matter.
Tips and Best Practices
- Keep the header toggle on when your first row names the columns. It produces far more usable JSON.
- Pick the delimiter that matches your source; semicolon files are common in comma-decimal locales.
- Quote any field that contains the delimiter, a quote or a line break so it parses as one cell.
- Choose minified output for code and 2-space indent when a human will read the result.
- Remember every value comes out as a string. Cast numbers and booleans in your own code.
Limitations and Notes
Everything runs entirely in your browser and nothing is uploaded, with input capped at roughly 2 MB. All CSV cells are converted to JSON strings, so the tool does not infer numeric, boolean or null types. Numbers arrive as quoted text. The parser follows RFC 4180 conventions for quoting and escaping; if your file uses a different quoting scheme, results may vary. Blank lines are dropped, and with the header option on, missing trailing cells become empty strings.
FAQs
No. Every cell is treated as text and output as a JSON string. Convert to numbers in your code if you need typed values.
Objects mode uses the first row as keys and produces an array of objects; Arrays mode outputs a raw array of arrays that mirrors the grid, including the header row.
Yes, as long as the field is wrapped in double quotes. The parser also handles escaped "" quotes and line breaks inside quotes.
Comma, semicolon, tab, pipe and space. Pick whichever matches your file.
Input is limited to about 2 MB to keep the browser responsive. Split larger files into chunks.
Yes. Conversion happens locally in your browser and nothing is sent to a server.