JSON appears here
Paste CSV and click Convert// convert CSV to JSON in one click
Convert CSV to JSON instantly. Configurable delimiter, header row, type inference, output as array of objects or nested. Live preview table. Browser-based, free, no sign-up required.
JSON appears here
Paste CSV and click ConvertPaste any CSV β exported from Excel, Google Sheets, a database, or any data source. The tool auto-detects the delimiter (comma, semicolon, tab, or pipe) and handles quoted fields correctly.
Choose whether the first row contains headers, enable type inference to convert numbers and booleans automatically, and pick the output format β objects, arrays, or keyed by first column.
The preview table shows parsed data. Copy the JSON to clipboard or download as a .json file ready to use in your application.
CSV to JSON Converter parses CSV data using a full RFC 4180 compliant parser β handling quoted fields, embedded commas, newlines inside quotes, and escaped quote characters β and produces clean JSON output. Three output formats, type inference, and a live preview table make it suitable for real-world data transformation tasks. Entirely in your browser, free, no data sent anywhere.
RFC 4180 is the standard specification for CSV files. It defines that fields may be enclosed in double quotes, that fields containing commas, double quotes, or line breaks must be enclosed in double quotes, and that a double quote inside a quoted field is represented by two consecutive double quotes. Most tools that export CSV (Excel, Google Sheets, PostgreSQL COPY) produce RFC 4180 compliant output. This parser handles all of these cases correctly.
When type inference is enabled, the converter attempts to detect the data type of each field rather than treating everything as a string. Values that look like integers (e.g. 42) become JSON numbers. Values that look like floats (e.g. 3.14) become JSON numbers. true and false (case-insensitive) become JSON booleans. Empty fields become null. Everything else remains a string. Disable type inference if you want all values preserved as strings.
Objects is the most common format β each row becomes a JSON object with header names as keys: [{"name":"Alice","age":30}]. Arrays outputs each row as a plain array: [["Alice",30],["Bob",25]] β useful for compact storage or matrix operations. Keyed outputs a single object where each row is keyed by the value in the first column: {"Alice":{"age":30},"Bob":{"age":25}} β useful for lookup tables.
The auto-detect mode samples the first line of the CSV and counts occurrences of common delimiter characters: comma, semicolon, tab, and pipe. The character with the highest count is selected as the delimiter. This works reliably for well-formed CSV files. If your CSV uses an unusual delimiter or the first line has equal counts of multiple candidates, manually selecting the delimiter produces the most reliable result.
Yes. When "First row = headers" is unchecked, the converter generates automatic column names β col_1, col_2, col_3, etc. β and all rows including the first are treated as data rows. This is useful for CSV files exported from systems that do not include column names, or for CSV files where the header is known and you want to skip it.
Yes. Excel's CSV export uses comma delimiters, double-quote enclosure for fields containing commas, and Windows-style CRLF line endings. All of these are handled correctly. Excel sometimes exports dates in locale-specific formats (e.g. 01/15/2025 vs 15/01/2025) β these are treated as strings rather than dates, since there is no universal date format in CSV. Use the timestamp converter to process date strings after conversion.
CSV (Comma-Separated Values) is the most universal data interchange format β virtually every database, spreadsheet application, and data pipeline can export to CSV. JSON is the standard format for APIs, web applications, and modern data processing. Converting between the two is a routine but error-prone operation when done manually, particularly for CSV files with quoted fields containing commas or newlines. This tool handles the conversion correctly for all RFC 4180 compliant CSV input.
The most common CSV parsing mistake is splitting on every comma character. RFC 4180 allows fields to contain commas as long as the entire field is enclosed in double quotes. For example, the CSV row "Smith, John",30,"New York, NY" has three fields, not five. A correct parser must track whether it is inside a quoted field before treating a comma as a field separator. This converter implements a full state-machine parser that handles quoted fields, embedded commas, embedded newlines, and escaped quote characters ("" inside a quoted field).
CSV has no type system β every field is a text string. When converting to JSON for use in an application, preserving all values as strings is sometimes correct (especially for identifiers, phone numbers, ZIP codes, and similar fields where leading zeros are significant), but often incorrect for numeric data. Type inference converts unquoted numeric strings to JSON numbers and true/false to JSON booleans, producing JSON that can be used directly in arithmetic operations without manual parsing.
The three output formats serve different use cases. Array-of-objects format is the standard for REST API responses and is directly consumable by most frontend frameworks. Array-of-arrays format is more compact and is useful for matrix operations, data visualisation libraries, and situations where column order matters more than column names. Keyed format produces an object lookup table using the first column as the key, which is efficient for data that will be frequently accessed by a primary key value.