CSV to JSON
Parse quoted CSV, validate the row shape, and create JSON entirely inside this browser tab.
CSV input
Stays in this browser tab
Result
Created only after validation
A validated result will appear here.The first row becomes keys. Quoted commas, escaped quotes, CRLF, and quoted line breaks are supported. Duplicate headers and uneven rows stop with a precise error.
About this CSV to JSON converter
Paste comma-separated values or open a .csv file of up to 20 MB, and click Convert to JSON. The first row defines object keys, each subsequent row becomes an object in a JSON array, and all cell values remain strings by design to prevent loss of leading zeros or numeric precision. Output is formatted with two-space indentation ready to copy or download as converted.json.
This tool converts standard RFC 4180 CSV tables into structured JSON arrays entirely on your local machine. It avoids the silent data loss typical of online converters by refusing to guess numeric, boolean, or date types: postal codes with leading zeros, large account numbers, and hyphenated codes retain every character. The parser enforces strict table integrity by verifying header uniqueness, ensuring no empty column names exist, and confirming every record contains exactly the declared number of columns.
Step by step
- 1Load or paste CSV contentChoose a .csv file up to 20 MB or paste raw tabular text directly into the input area. Leading byte-order marks (BOM) are automatically stripped.
- 2Parse and validate structureClick Convert to JSON. The parser scans commas, handles nested quotes and escaped characters, and validates that every row matches the header column count.
- 3Inspect the formatted JSON outputReview the generated JSON array in the output pane, with row and column counts displayed in the summary badge alongside processing time in milliseconds.
- 4Copy to clipboard or downloadClick Copy to clipboard for immediate pasting or Download JSON to save the converted file directly to your disk as converted.json.
Why all values remain strings by design
Many generic CSV converters attempt to parse numbers and booleans automatically, which introduces subtle and dangerous data corruption. JavaScript numbers lose precision beyond 9,007,199,254,740,991 (Number.MAX_SAFE_INTEGER), corrupting 16-digit credit cards, database snowflakes, and tracking IDs. Furthermore, postal codes like "01234" lose their leading zeros, and date strings like "1-2" convert into arbitrary calendar dates. By preserving all cell values as explicit JSON strings, this converter guarantees lossless data preservation.
RFC 4180 quote escaping and structural refusals
The parser fully adheres to RFC 4180 rules for quoted fields. Cells enclosed in double quotes may contain literal commas and line breaks, with quotation marks represented by doubled quotes (""). Three named validation checks reject corrupt files: empty headers in row 1 are rejected, duplicate header names are blocked to prevent key collisions, and short or ragged rows trigger an explicit error naming the exact row number and column mismatch.
Zero upload security guarantee
Every response from this site is served with a Content Security Policy whose connect-src directive is set to none. That is not a promise in marketing copy; it is an instruction to your browser, and the browser is the one enforcing it. While this page is open it cannot open a connection to anywhere — not to this site, not to anyone else — so there is no path by which your document could be uploaded, not by a bug, not by a future change, not by a script that should not be here. e2e/egress-proof.spec.ts asserts the served header and then tries to send data out by every route a page has and requires each attempt to be refused, and it runs on every build.
The second half of the guarantee is that the code has nowhere to send anything from. lib/tools/local-source-policy.test.ts reads every source file under lib/tools, workers, components and app on every test run and fails the build if any of them contains fetch, XMLHttpRequest, WebSocket, EventSource, sendBeacon or a peer connection, or even a remote address written down in a comment. A tool here cannot acquire an upload by accident, because the file that would have to contain one cannot be committed.
In-browser performance and memory management
Computations run directly on your own device using WebAssembly, Web Workers, and modern browser APIs including Web Crypto and TextDecoder. There are no server queues, no background telemetry, and no temporary cloud files created. Large operations remain responsive by offloading heavy parsing and conversion tasks to dedicated worker threads, ensuring the browser UI never freezes during intensive document and data processing tasks.
Questions people ask
- How are quotes, commas, and line breaks handled inside cells?
- Fields wrapped in double quotes can safely contain commas, spaces, and multiline line breaks. Internal quotation marks are escaped with standard doubled double quotes (""). Any unclosed quote halts parsing with an explicit error message.
- Why does the converter reject duplicate column headers?
- In JSON objects, keys must be unique. If two columns share identical header names, the second column would silently overwrite the first. The converter enforces unique headers to prevent silent data loss.
- Are semicolons or tabs supported as delimiters?
- This tool is strictly configured for comma-separated values (CSV). For tab-separated (TSV) or semicolon-delimited files, convert delimiters or open the file in the dedicated Data Workbench.
- What are the file size and line count limitations?
- The file picker limits uploads to 20 MB of text to prevent browser tab out-of-memory crashes. Pasted text has no hard cap other than available client system memory.
- Does this converter send any data across the internet?
- None. The entire CSV parsing and JSON serialization pipeline executes locally in your browser session under an enforced Content Security Policy of connect-src none.