CSV to JSON Converter
Convert any CSV file into a JSON array of objects. Automatic header detection, custom delimiters, type coercion, and proper quote handling.
Output will appear here…Convert CSV files back into JSON
Spreadsheets are everywhere. Stakeholders send them, database tools export them, and many legacy systems still speak CSV natively. Converting a CSV file into JSON lets you feed that data into modern APIs, JavaScript applications, or configuration files. Paste your CSV, pick a delimiter, and the converter produces a JSON array of objects — one object per row, with the header row supplying the keys.
The converter uses PapaParse, the most popular JavaScript CSV library. It handles RFC 4180 quoting rules correctly: quoted values can contain the delimiter, double quotes (escaped by doubling), and embedded new lines. If your CSV is malformed — uneven rows, missing quotes — the parser does its best and reports warnings rather than failing silently.
Type coercion: numbers, booleans, null
By default, the converter auto-detects the type of each value. Strings that look like integers become numbers, decimals become floats, the literals true andfalse become booleans, and empty cells becomenull. This is usually what you want — it produces JSON that is ready to use without further processing.
Toggle type coercion off if you want every value to remain a string. This is useful for fields like zip codes that start with zero (which would otherwise be converted to a number and lose the leading zero), phone numbers, IDs that look like numbers but are not, and any other field where the string representation matters.
TSV, pipe-delimited, and unusual separators
The delimiter dropdown handles the common cases: comma, semicolon, tab, and pipe. For unusual separators like caret or tilde, choose the closest option and post-process the result. The auto-detect option uses PapaParse's built-in heuristic, which works for most well-formed CSV files but can be fooled by files that mix delimiters or have unusual quoting.
Handling malformed CSV
Real-world CSV files are often messy. The parser handles rows with more or fewer fields than the header by skipping extra fields or padding missing ones with null. It never silently truncates data. If you see warnings in the output, inspect the source file — the most common causes are unquoted values that contain the delimiter, or missing closing quotes on a value.
Frequently asked questions
Common questions about the CSV → JSON tool.