CSV ↔ JSON Converter

CSV ↔ JSON Converter

Convert CSV to JSON or JSON to CSV instantly in your browser. Paste your data, choose the direction, and download the result. Free, private, no signup.

Updated April 2026

Shift + Enter to Copy
Delimiter
detected: comma
Output
CSV Input
JSON Output
20 lines · 308 chars

CSV to JSON Converter — Free Online CSV ↔ JSON Tool

Convert CSV files to JSON arrays or turn JSON data back into a CSV spreadsheet — instantly and for free. No account, no upload to any server.

Whether you're a developer feeding spreadsheet data into a REST API, an analyst exporting JSON records into Excel, or a data engineer building an ETL pipeline, this tool handles both conversion directions in your browser with zero setup.

How to Use the CSV to JSON Converter

  1. Choose the direction — CSV → JSON or JSON → CSV using the toggle at the top.
  2. Paste your data — or upload a .csv or .json file directly.
  3. Configure options — set the delimiter, toggle headers, choose output format (array or object), or enable type inference.
  4. Copy or download the result — ready to use in your API, app, or spreadsheet.

CSV → JSON Conversion

CSV (Comma-Separated Values) is the standard format for exporting tabular data from spreadsheets like Excel and Google Sheets, and from databases and reporting tools. JSON (JavaScript Object Notation) is the standard format for data exchange in modern web applications, REST APIs, and NoSQL databases like MongoDB.

When you load a CSV file into this converter, the first row is treated as the header — each column name becomes a key in the resulting JSON objects. Every subsequent row becomes one object in the output JSON array.

This tool handles real-world CSV nuances: automatic delimiter detection (comma, semicolon, tab, pipe), quoted fields containing commas or line breaks, and optional type inference to convert numeric and boolean values from strings to their native JSON types. All conversion happens in your browser — no file is ever uploaded to a server.

JSON → CSV Conversion

Converting JSON to CSV is the reverse journey: taking structured JSON data — typically from an API response or a database export — and flattening it into a tabular format that can be opened directly in Excel, Google Sheets, or any BI tool like Tableau or Power BI.

This converter handles flat JSON arrays of objects (the most common API response format) and applies smart flattening for nested objects, creating dot-notation column names. For example, {"user": {"name": "John"}} becomes a column named user.name. The output CSV uses comma as the default delimiter, with an option to switch to semicolons for better compatibility with European versions of Excel.

When to Use CSV → JSON vs JSON → CSV

Use CSV → JSON when:

  • Feeding spreadsheet data into a JavaScript app or web framework (React, Vue, Angular)
  • Importing tabular data into a NoSQL database (MongoDB, Firestore)
  • Preparing a dataset for an API endpoint or a REST payload
  • Converting an Excel export to a format that Python or JavaScript can parse natively

Use JSON → CSV when:

  • Exporting API response data to open in Excel or Google Sheets
  • Sharing structured data with analysts or non-technical stakeholders
  • Feeding JSON records into a BI tool (Tableau, Power BI, Looker)
  • Archiving or versioning data in a lightweight, readable format

Frequently Asked Questions

What is the difference between CSV and JSON?

CSV is a flat, tabular format where data is organized in rows and columns separated by commas. JSON is a structured, hierarchical format using key-value pairs and arrays. CSV is ideal for spreadsheets and analytics; JSON is the standard for APIs and web applications. Both represent the same data — just in different shapes. CSV is universally readable in spreadsheet tools while JSON is natively parsed by every modern programming language.

How does the CSV to JSON converter handle headers?

The first row of your CSV is automatically used as the header row. Each column name becomes a key in the resulting JSON objects, and each subsequent row becomes one object in the JSON array. For example, a CSV row John,30 with headers name,age becomes {"name": "John", "age": "30"}. If your CSV has no header row, uncheck the "Has Headers" option and the tool will output raw arrays instead.

Can the converter handle semicolons and tabs as delimiters?

Yes. The tool automatically detects the most common delimiters — comma (,), semicolon (;), tab (\t), and pipe (|). You can also set the delimiter manually if your file uses a specific separator. This is especially useful for CSV files exported from European Excel versions, which default to semicolons instead of commas.

What happens with nested JSON when converting to CSV?

Nested JSON objects are flattened into dot-notation column names. For example, {"user": {"name": "John"}} becomes a column named user.name. Arrays within JSON objects are stringified and placed in a single cell. Only one level of nesting is flattened — deeply nested structures are kept as JSON strings in the cell.

Is my data safe when using this tool?

Yes. All conversion happens entirely in your browser using JavaScript. No data is sent to any server, stored, or tracked. Your CSV and JSON files never leave your device. This tool is fully private and works offline after the page loads.

What does the "Infer Types" option do?

When enabled, the converter attempts to detect the native type of each field. A column containing 42 becomes the number 42 in JSON instead of the string "42". Boolean values true and false are converted to JSON booleans, and empty fields become null. This is useful when feeding JSON data into APIs or databases that are strict about types.

Resources

Related Tools