CSV to JSON Converter
Convert CSV to JSON in your browser, with correct handling of quoted fields, embedded commas and the type-guessing traps.
Need this built for your product?
We design, build & host secure software & APIs.
CSV is less standardised than it looks
There is no single CSV specification that everyone follows. Delimiters vary, and in locales using a comma as the decimal separator the field delimiter is usually a semicolon. Quoting rules differ, line endings differ, and whether a header row exists is a convention rather than a rule. Any converter has to guess, and stating what it guessed is more useful than pretending there was nothing to guess.
Quoted fields are where parsers break
A field containing a comma must be quoted, and a quote inside a quoted field is escaped by doubling it. Splitting each line on commas, which is the obvious naive implementation, corrupts any row containing an address, a description or a decimal in a comma-decimal locale. A real parser is required, not a split.
Everything in CSV is a string
CSV carries no type information. Converting to JSON forces a decision: leave every value as a string, or infer numbers and booleans. Inference is convenient and dangerous. Leading zeros vanish, so a postcode of 01234 becomes 1234. Long numeric identifiers lose precision past 2^53-1. Values like NA, true and null get coerced. For identifiers and codes, keep strings.
Duplicate and empty headers
JSON object keys must be unique, so two columns named the same collide and one silently wins. Empty header cells produce empty keys. Both are common in spreadsheets exported by hand, and both cause silent data loss rather than an error.
Empty is not null
An empty CSV cell could reasonably become an empty string, null, or an omitted key. These are three different things to whatever consumes the JSON, and the choice should be deliberate rather than incidental.
Converted locally
Parsing happens in your browser. Spreadsheets routinely contain customer records and financial data, so keeping the file local matters.
Frequently Asked Questions
Privacy & Security
All processing happens locally in your browser — nothing is uploaded.
How to Use
Paste CSV (first row = headers). Choose a delimiter; JSON output updates live.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
JSON Formatter
DeveloperFormat and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
JSON Validator
DeveloperValidate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
Regex Tester
DeveloperTest regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.