BrowserTools
Advertisement
Home / Converters / CSV ↔ JSON Converter

CSV ↔ JSON Converter

Convert between CSV and JSON locally with custom delimiters and quoting, no upload, no limits.

Loading CSV ↔ JSON Converter… If nothing happens, please enable JavaScript.

Frequently asked questions

Are my files uploaded to a server?
No. The conversion runs entirely in your browser using JavaScript. Your data is never transmitted over the network, making this tool safe for sensitive business data, personally identifiable information, or confidential datasets.
What is RFC 4180 and why does it matter?
RFC 4180, published in 2005, is the closest thing CSV has to an official standard. It defines rules for quoting fields that contain commas, newlines, or double-quote characters, and specifies that a double-quote inside a quoted field is escaped by doubling it. This tool's parser implements RFC 4180, which means it correctly handles files produced by Excel, Google Sheets, and most database export utilities.
What delimiters are supported?
The tool supports comma, semicolon, tab, and pipe as delimiters. Semicolon-delimited files are common in European locales where the comma is used as a decimal separator. Tab-delimited files (TSV) are frequently produced by database tools and are less ambiguous than CSV because field values rarely contain tab characters.
How are quoted fields and embedded commas handled?
Fields that contain the delimiter character, a double-quote, or a newline must be wrapped in double-quote characters according to RFC 4180. A literal double-quote inside such a field is represented by two consecutive double-quote characters. The parser handles all these cases correctly, so a field value like She said, "hello" will round-trip without corruption.
What happens to data types when converting CSV to JSON?
CSV has no type system — every value is a string. By default the converter preserves values as strings in the JSON output. If you need numbers or booleans to be typed correctly, you will need to post-process the JSON, for example with a small script that iterates the array and casts specific fields.
Can I convert JSON back to CSV?
Yes. The tool works in both directions. For JSON-to-CSV conversion, the top-level JSON value must be an array of objects with consistent keys. The keys of the first object become the CSV header row. Nested objects and arrays are serialised as JSON strings in the corresponding CSV cell.
Is there a file size limit?
There is no enforced limit; conversion is bounded only by your browser's available memory. Files up to around 50 MB typically process in seconds. Very large files (100 MB or more) may cause the browser tab to become slow or unresponsive. For bulk processing of large files, command-line tools such as jq, csvkit, or Miller are more appropriate.
Why does Excel use semicolons instead of commas in CSV files?
In locales where the comma is used as the decimal separator (most of continental Europe), Excel uses the semicolon as the list separator to avoid ambiguity. A number like 1,234 would otherwise be parsed as two separate fields. If you open a file exported from an Excel installation set to a European locale, switch the delimiter to semicolon in this tool.
When should I use JSON instead of CSV?
JSON is the better choice when your data has a hierarchical or nested structure, when you need to preserve data types (numbers, booleans, nulls), or when the output will be consumed directly by a JavaScript application or REST API. CSV is preferable when the data is purely tabular, when file size is critical, or when the recipient will open the file in a spreadsheet application.
How do I handle CSV files with encoding issues?
CSV files do not carry encoding metadata, so a file saved in Windows-1252 (a common encoding from older Windows applications) may display garbled characters when opened as UTF-8. If you see strange symbols, try opening the file in a text editor, saving it explicitly as UTF-8, and then pasting the contents into this tool. Modern exports from Excel and Google Sheets default to UTF-8 with or without a BOM (byte-order mark).

About CSV ↔ JSON Converter

CSV (Comma-Separated Values) and JSON (JavaScript Object Notation) are the two most widely used plain-text formats for structured data. CSV has its origins in the earliest days of computing — mainframe programs were exchanging tabular data in comma-delimited form as early as the 1960s — yet the format lacked a formal specification until RFC 4180 was published in October 2005. This absence of a standard created decades of incompatible dialects: some implementations use semicolons as delimiters, others use tabs; some quote all fields, others quote only fields containing special characters; line endings vary between systems. Despite these quirks, CSV remains the universal export format for spreadsheets, databases, and data-analysis tools because of its simplicity and human readability.

JSON emerged in the early 2000s, standardised by Douglas Crockford, and quickly became the dominant format for web APIs because it maps naturally onto the objects and arrays that every programming language understands. When a developer pulls data from a REST API, it almost always arrives as JSON. When a data analyst exports a table from Excel or PostgreSQL, it almost always comes out as CSV. Converting between the two is consequently one of the most common data-preparation tasks in software development, data engineering, and business intelligence. Common real-world scenarios include loading a CSV export from a CRM into a JavaScript application, flattening a JSON API response into a spreadsheet for review, or preparing data for import into a tool that accepts only one of the two formats.

This converter runs entirely inside your browser — no data is sent to any server. You can paste text directly or load a file, choose the direction of conversion (CSV to JSON or JSON to CSV), configure the delimiter character, and toggle whether the first row should be treated as a header. The JSON output is pretty-printed for readability. Edge cases such as fields containing the delimiter character, embedded newlines inside quoted fields, and doubled-quote escapes are all handled according to RFC 4180 rules.

A few practical gotchas to be aware of: CSV does not have a native concept of data types, so numbers, dates, and booleans all arrive as strings in the parsed JSON — you may need to post-process the output to cast fields to the correct types. Files exported from Excel in European locales often use semicolons as delimiters instead of commas; switch the delimiter setting if your columns are not splitting correctly. Large files above 50 MB may process slowly in the browser; for those, a command-line tool like jq or csvkit will be faster. When converting JSON to CSV, nested objects and arrays are flattened or serialised as strings, so deeply nested structures may require manual cleanup.

From Punch Cards to REST APIs: The Unlikely Parallel Lives of CSV and JSON

The comma-separated value format is one of the oldest surviving data interchange formats in computing. IBM mainframe programs were exchanging data in comma-delimited text files as early as the 1960s, predating the personal computer by more than a decade. The format was so straightforward — one record per line, fields separated by a known character — that it needed no formal documentation; everyone simply agreed by convention. When the first spreadsheet programs appeared in the late 1970s (VisiCalc in 1979, Lotus 1-2-3 in 1983), CSV became the natural bridge between them and the databases and programs that surrounded them. It survived the transition from mainframes to minicomputers to PCs to the web almost entirely unchanged, which is why a CSV file produced by a COBOL program in 1985 can still be opened in Microsoft Excel today.

JSON has a much shorter but equally interesting history. Douglas Crockford, the format's creator, has said that he "discovered" JSON rather than invented it — the syntax was already present in JavaScript as a way to write object literals, and Crockford simply identified it as a useful standalone data format around 2001. The first JSON parser was written in about 30 lines of code. By 2006, JSON had been formalised as ECMA-404 and was rapidly displacing XML in web APIs because it was lighter, easier to read, and mapped directly onto native data structures in every major programming language. Today JSON is so ubiquitous that it is used for configuration files (package.json, tsconfig.json), database storage (PostgreSQL's jsonb type, MongoDB's document model), log formats, and countless other purposes its creator never anticipated.

The tension between CSV and JSON mirrors a broader tension in software engineering between simplicity and expressiveness. CSV wins on simplicity: anyone can read and edit a CSV file in a text editor or spreadsheet without knowing anything about programming. JSON wins on expressiveness: it can represent nested structures, typed values, and mixed schemas that CSV cannot. A 2023 survey of data engineers found that CSV and JSON together account for over 70 % of all data file exchanges between organisations — a remarkable statistic for two formats whose core designs are decades old, in a field that reinvents itself every few years.

Advertisement