CSV ⇄ JSON Converter
Paste CSV or JSON, choose a direction, and PocketSpry converts it instantly in your browser. CSV → JSON uses the first row as keys and keeps every value a string, so IDs and leading zeros are never changed; JSON → CSV takes an array of flat objects and builds columns from the union of keys, turning null and missing values into empty cells. Quoted fields with embedded commas, quotes, and line breaks are handled correctly. Your data is processed locally and not sent to PocketSpry’s AI service.
Convert CSV and JSON instantly
Paste your data, choose a direction, and PocketSpry converts it locally in your browser — no sign-up, no upload, and no waiting on a server.
CSV to JSON
The first CSV row becomes the object keys, and each remaining row becomes one JSON object. Every CSV cell value stays a string, and the JSON is pretty-printed with 2-space indentation.
JSON to CSV
Paste a top-level array of flat objects with primitive values. The converter uses the union of all keys, in first-seen order, as the CSV columns, and quotes any field that needs it.
Why CSV values stay strings
Automatically turning CSV text into numbers, booleans, dates, or null would silently corrupt data — a ZIP code like 00123 would lose its leading zeros, and a code like 007 would become 7. So CSV → JSON keeps every value exactly as written, as a string.
Quoted CSV fields
Commas, double quotes, and line breaks inside properly quoted fields are supported, following RFC-4180 CSV rules (an embedded quote is written as two quotes). Rows whose column count does not match the header, and duplicate or blank headers, are rejected rather than silently changed.
Flat JSON only
This version supports flat objects with primitive values. Nested objects and arrays are intentionally rejected rather than flattened or stringified into cells, so you always know exactly what a cell holds.
Null and missing values
CSV has no native null. When converting JSON → CSV, a null value or a missing key becomes an empty cell. When converting CSV → JSON, empty cells stay as empty strings.
Private and browser-local
Your CSV and JSON are processed locally in your browser. They are not sent to PocketSpry’s AI service, and your data and the converted result are not sent to analytics.
Review conversions
CSV and JSON represent data differently, and converting can lose structure that one format cannot express. Review the converted result before you rely on it, and review untrusted CSV before opening it in a spreadsheet application.
Frequently asked questions
- What does CSV ⇄ JSON Converter do?
- It converts CSV to JSON or JSON to CSV in your browser, in whichever direction you choose.
- Is it browser-local?
- Yes. All conversion happens in your browser.
- Is my data sent to AI?
- No. This tool does not use AI and makes no server or AI call.
- Does it support CSV to JSON?
- Yes.
- Does it support JSON to CSV?
- Yes.
- Does the first CSV row become headers?
- Yes — the first row becomes the object keys.
- Are CSV numbers automatically converted to JSON numbers?
- No. CSV values stay strings to avoid silently changing your data.
- Why keep CSV values as strings?
- To prevent corruption of IDs, ZIP codes, leading zeros, dates, and codes.
- Does it preserve leading zeros?
- Yes, when converting CSV to JSON.
- Does it support commas inside fields?
- Yes, when the field is properly quoted.
- Does it support quotes inside quoted CSV fields?
- Yes — write an embedded quote as two quotes.
- Does it support line breaks inside quoted fields?
- Yes.
- What happens with duplicate CSV headers?
- They are rejected, since they would overwrite each other.
- What happens if a CSV row has the wrong number of columns?
- That row is rejected with a clear error.
- What JSON shape is supported?
- A non-empty array of flat objects with primitive values.
- Can I convert nested JSON?
- Not in this version; nested objects and arrays are rejected.
- What happens to JSON null?
- It becomes an empty CSV cell.
- What happens when objects have different keys?
- The converter uses the union of keys, in first-seen order, and missing values become empty cells.
- Does it support TSV?
- No, not in this version.
- Can I upload a CSV file?
- No, not in this version — paste the text.
- Does PocketSpry send CSV/JSON content to Plausible?
- No. Your data and the converted result are not sent to analytics.
- Is the conversion AI generated?
- No. It is computed deterministically in your browser.