CSV to JSON Converter
Convert CSV to JSON in your browser, with correct handling of quoted fields, embedded commas and the type-guessing traps.
Last reviewed by the Radiatus Cloud team
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.
Related tools
- JSON Formatter — Format 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 — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
- Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
- HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.
Frequently Asked Questions
Why did my data break at the commas?
A field containing a comma must be quoted, and naive parsers that split on commas corrupt those rows. Addresses, descriptions and decimals in comma-decimal locales are the usual casualties.
Should numbers be converted to JSON numbers?
Only where they are genuinely quantities. Inference strips leading zeros, so postcode 01234 becomes 1234, and loses precision on identifiers past 2^53-1. Keep codes and IDs as strings.
What happens to duplicate column names?
JSON keys must be unique, so one column silently overwrites the other. Empty header cells produce empty keys. Both are common in hand-exported spreadsheets and both lose data without erroring.
Is the delimiter always a comma?
No. Locales using a comma as the decimal separator typically use a semicolon as the field delimiter, and tab-separated files are common too. A converter has to detect or be told.
How should empty cells be represented?
Choose deliberately between an empty string, null, or omitting the key, because those mean three different things to whatever consumes the JSON.
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.