CSV to JSON Converter

Convert CSV to JSON and JSON to CSV online. Free CSV-JSON converter - supports headers, custom delimiters, and pretty print.

🔒 Your text stays in your browser - nothing is sent to our servers
Delimiter:
CSV Input
JSON Output
How to Use

Three steps to get started

1

Choose direction

Select "CSV → JSON" to convert a CSV file, or "JSON → CSV" to export JSON data as a spreadsheet.

2

Paste your data

Paste your CSV or JSON into the input area. For CSV, select the correct delimiter if it is not a comma.

3

Copy the result

Click Copy to grab the converted output and use it in your application, database, or spreadsheet tool.

About This Tool

CSV to JSON conversion explained

CSV (Comma-Separated Values, described by RFC 4180) is a flat, tabular text format: one record per line, fields separated by a delimiter, and an optional header row naming the columns. JSON (RFC 8259) is a hierarchical format built from objects and arrays. Converting CSV to JSON therefore means turning a rectangle into an array of objects, where the header row supplies the keys and each data row becomes one object. Converting back flattens that array into rows, taking the keys of the first object as the header.

Converting between them is a daily task for developers and data analysts:

  • API preparation: Export from Google Sheets or Excel as CSV, then convert to JSON to POST to a REST endpoint or load as a test fixture
  • Analysis: Take a JSON API response and convert to CSV so it opens in Excel, Numbers, Tableau, or a pandas read_csv call
  • Database seeding: Turn a CSV dump into the array-of-documents shape MongoDB's insertMany or a Firebase import expects
  • ETL and migration: Bridge two systems whose importers and exporters disagree about format
  • Static sites and dashboards: Convert a spreadsheet of content into a JSON file a front end can fetch directly

Why CSV conversion goes wrong

CSV looks trivial and is not. The format was in wide use for decades before RFC 4180 attempted to describe it in 2005, and real files still disagree on the details. The recurring problems:

  • Delimiters inside data. A field like Smith, John must be wrapped in double quotes, and a literal quote inside a quoted field is escaped by doubling it (""). This tool handles both.
  • Locale variance. Excel exports semicolon-delimited files in locales where the comma is the decimal separator, which is why the delimiter selector offers semicolon, tab, and pipe alongside comma.
  • Type loss. CSV has no types - every cell is text. A ZIP code like 02134 or a long ID can lose its leading zeros or be reinterpreted as a number when it round-trips through a spreadsheet.
  • Nesting. JSON objects can contain other objects and arrays; CSV cannot represent that. Flatten nested data (for example to address.city columns) before converting JSON to CSV.
  • Line endings and BOM. RFC 4180 specifies CRLF, files from Unix tools use LF, and Excel prepends a UTF-8 byte-order mark that can turn the first header into a key with an invisible prefix.

JSON output is pretty-printed with two-space indentation so it is readable and diff-friendly. Everything is parsed and serialised by JavaScript in this browser tab - customer lists, exports, and internal datasets are never uploaded, and the only size limit is your device's available memory.

FAQ

Frequently Asked Questions

Related Tools