The CSV To JSON converter processes the pasted table locally in your browser without uploading it.
Open the CSV To JSON converter, paste the contents of one comma-delimited CSV file, and convert it into a pretty-printed JSON array. The first record becomes the property keys, later records become objects, and all processing stays in the current browser tab.

What Runs in the Browser
The converter handles one comma-delimited text table at a time. It validates the input before presenting a completed result, then lets you copy the JSON or download it as converted.json.
- CSV parsing, header validation, row-width checks, and JSON construction run locally.
- JSON serialization and UTF-8 output-size measurement also happen in your browser.
- Clipboard copying and converted.json download creation require no server-side file processing.
- No CSV or JSON is uploaded to the converter.
The tool does not fetch linked values, evaluate spreadsheet formulas, flatten structures, deduplicate records, rename keys, normalize Unicode, or decide whether the data has valid business meaning. Those checks remain separate from the conversion.
How the JSON Is Structured
The output is an array of objects, not an object keyed by row number. Header order determines property order, and every data cell is serialized as a JSON string.
| CSV input | JSON result |
|---|---|
| First record | Exact property keys in their original order |
| Each valid later record | One object in the output array |
| Every cell | A JSON string |
| 001 | "001" |
| true | "true" |
| null | "null" |
| Empty cell | "" |
This string-only behavior prevents accidental type changes. The converter does not guess numbers, Booleans, null, dates, formulas, or empty values from their spelling. If an API needs a numeric or Boolean field, convert that string deliberately after validating the JSON.
Records are constructed so headers named __proto__, constructor, prototype, or toString remain ordinary string keys rather than inherited object behavior. The final serializer escapes property names, quotes, backslashes, control characters, and embedded line endings, using two-space indentation as described by JSON.stringify. The result is valid JSON data, not executable code, but a receiving application must still parse and validate it.
Convert a CSV in Your Browser
Use this sequence to move from pasted CSV to a checked JSON file:
- Prepare one table. Use commas as delimiters and make the first record a header with nonempty, unique names. Paste the source text without changing its quoting or record endings.
- Run the conversion. The converter checks the CSV syntax, headers, row widths, and resource limits. A malformed or over-limit input fails explicitly instead of producing partial JSON.
- Read the summary. Confirm the reported data-row count, column count, cell count, and UTF-8 output size. These figures help detect truncated or unexpectedly wide input before you download it.
- Review the JSON. Check that the property names match the headers and that every cell value remains a quoted string. Pay particular attention to leading zeros, empty cells, quoted commas, embedded quotes, and line endings inside quoted fields.
- Copy or download the complete result. Use the copy action when the JSON will be pasted directly into an editor, or download converted.json for an API fixture or application import.
Editing the CSV clears the previous output, summary, and errors and revokes the old JSON download. A failed conversion likewise leaves no stale download, so always confirm that a new result is present before copying or saving it.
CSV Syntax That Affects Conversion
The parser uses a finite RFC 4180-style dialect rather than detecting a format from the data. The following rules determine whether the input can be converted:
- Delimiter: Comma is the only delimiter. Tabs, semicolons, and pipes are treated as ordinary field characters.
- Quoted fields: Fields may be unquoted or enclosed in double quotes. A quoted field can contain commas, CRLF, LF, CR, and doubled double quotes. Two doubled quotes decode to one literal quote.
- Invalid quotes: An unquoted quote is an error. After a closing quote, only a comma, record ending, or end of input is accepted, so a space or other trailing character causes an error rather than being discarded.
- Record endings: CRLF is the canonical ending, while standalone LF and standalone CR are accepted for interoperability. Line endings inside quoted fields remain field data with their original spelling.
- Final and blank records: One optional final record ending does not create an extra empty record. A second consecutive ending represents a blank record rather than being silently discarded; normal row-width validation still applies.
- UTF-8 BOM: One leading U+FEFF is consumed before header parsing. Later U+FEFF characters remain data, and input containing only the BOM reports a required-input error.
Header and Row Validation
The first record is always treated as the header in this converter, so headerless CSV is not accepted. Each header must contain at least one character after the optional leading BOM is removed. Empty first, middle, or final headers fail.
- Header comparison is exact and case-sensitive, and duplicate names are rejected.
- Whitespace is data: headers and cells are not trimmed.
- Every data record must contain exactly the same number of fields as the header. Short or long rows fail without partial JSON.
- The converter does not merge uneven rows, repair mismatched quotes, skip comments, discard blank records, or recover only a valid prefix.
Reviewing the headers before conversion is therefore important. A visually similar name, an accidental trailing space, or one extra comma can turn an otherwise valid table into a failed conversion.
Limits for a Complete Conversion
All limits are checked before or during the complete conversion, with no silent truncation:
| Resource | Maximum | Measurement |
|---|---|---|
| Raw pasted input | 5,000,000 | UTF-16 code units |
| Data rows | 10,000 | Records after the header |
| Columns | 200 | Columns in the table |
| Data cells | 200,000 | Cells across data records |
| Generated JSON | 10,000,000 | UTF-8 bytes |
Exact boundaries are accepted, while one extra unit, row, column, cell, or output byte beyond a boundary fails explicitly. The raw-input budget is checked before the optional leading BOM is removed. Output size is measured with TextEncoder, not JavaScript string length, so multibyte characters count according to their encoded byte size. The cell limit can also be reached before the row limit on a wide table, which is intentional.
Review Before Import
A successful conversion confirms the file's structure, not the correctness of the data for a particular application. Before sending the JSON to an API or importing it into a project, check these points:
- Compare the summary's row, column, and cell counts with the source table.
- Confirm every intended header is present, unique, and spelled exactly as the destination expects.
- Check complex fields containing commas, doubled quotes, or embedded line endings.
- Review leading-zero identifiers, text such as true or null, and empty cells that might need explicit downstream typing.
- Retain the source CSV when original quoting, BOM placement, or line-ending style matters.
The converter produces syntactically valid JSON, but it does not validate business meaning or infer a schema. Your receiving application should still parse the result, check required fields, and perform any type conversion that its contract requires.
For a deeper look, see Camel Case to Snake Case Explained: Rules and Workflow.