CSV To JSON

Login

Email
Password

Don't have an account yet?

Go to Sign up

{{ workbook ? 'Online Table Editor' : 'Input Data' }}
Change File Enter Data
Row Col Row Col
Transpose Clear Delete Empty Deduplicate
ABC abc Abc
Replace
First Row as Header
{{ displayRows.length }} rows x {{ displayHeaders.length }} columns{{ firstRowAsHeader ? ' (1 header)' : '' }} {{ selectedRows.length > 0 ? selectedRows.length + ' selected' : '' }}
Output Data
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert CSV to JSON in seconds — paste, edit, and download JSON.

Data Format:
Root Object Name:
Indent Size:
2 spaces 4 spaces 8 spaces Tabs
Parse JSON:
Parse JSON strings in cells into objects
Minify Output:
Generate compact single-line JSON format
Convert Restart
Insert Row Below
Insert Row Above
Insert Column Right
Insert Column Left
Delete Row {{ contextMenu.row + 1 }}
Delete Column {{ contextMenu.col + 1 }}
Clear Cell
Clear Row
Case sensitive Use regex Cancel Replace All

What Is JSON?

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It uses human-readable text to store and transmit data as key-value pairs and ordered lists. JSON is language-independent — every modern programming language has built-in JSON parsers.

JSON supports four data types:

  • Objects — unordered key-value pairs: {"name": "Alice"}

  • Arrays — ordered lists: [1, 2, 3]

  • Values — strings, numbers, booleans, or null

  • Nested structures — objects and arrays can contain each other

Why Convert CSV to JSON?

CSV is flat. JSON is structured. Converting CSV to JSON unlocks:

  • API consumption — REST APIs return JSON, not CSV

  • NoSQL databases — MongoDB, DynamoDB, and Firestore store documents as JSON

  • Frontend frameworks — React, Vue, and Angular work natively with JSON

  • Configuration files — package.json, tsconfig.json, and many others use JSON

  • Data pipelines — ETL tools process JSON more flexibly than flat files

Data Formats

The converter supports four output structures. Given this CSV:

name,age,cityAlice,30,BerlinBob,25,Tokyo

Array of Objects

The most common JSON format. Each CSV row becomes an object, with column headers as keys.

[  

{"name": "Alice", "age": "30", "city": "Berlin"},  

{"name": "Bob", "age": "25", "city": "Tokyo"}

]

Use when: consuming data in JavaScript, sending to REST APIs, storing in MongoDB.

2D Array

Headers and data rows become nested arrays. The first sub-array contains column names.

[  

["name", "age", "city"],  

["Alice", "30", "Berlin"],  

["Bob", "25", "Tokyo"]

]

Use when: feeding data into chart libraries (Chart.js, D3.js), matrix operations, or tabular data processing.

Column Array

Each column becomes a key with an array of all its values.

{  

"name": ["Alice", "Bob"],  

"age": ["30", "25"],  

"city": ["Berlin", "Tokyo"]

}

Use when: building lookup tables, filtering by column, or feeding data into visualization tools.

Keyed Array

The first column value becomes the key for each row object.

{

 "Alice": {"age": "30", "city": "Berlin"},

 "Bob": {"age": "25", "city": "Tokyo"}

}

Use when: you need O(1) lookup by the first column value, creating dictionaries or maps.

Core Features

Root Object Name

Enter a Root Object Name to wrap the entire JSON output in a named key:

{

 "employees":

 [

{"name": "Alice", "age": "30"},

{"name": "Bob", "age": "25"}

 ]

}

Without a root object name, the output is a bare array or object.

Indent Size

Control formatting with four options:

OptionUse Case
2 spacesJavaScript/Node.js convention
4 spacesPython/Java convention
8 spacesLegacy systems
TabsMinimal file size with structure

Parse JSON

Enable Parse JSON to detect and parse JSON strings within CSV cells into actual JSON objects instead of escaped strings.

Without Parse JSON:

{"metadata": "{\"version\": 1, \"type\": \"report\"}"}

With Parse JSON:

{"metadata": {"version": 1, "type": "report"}}

This is essential when CSV cells contain embedded JSON data (common in API exports and log files).

Minify Output

Enable Minify Output to strip all whitespace, producing compact single-line JSON. This reduces file size by 30–50%, useful for:

  • API payloads

  • Database storage

  • Production configuration files

Full Table Editor

After uploading your CSV or TSV file, the built-in editor lets you:

  • Add, delete, and reorder rows and columns

  • Transpose rows to columns

  • Remove empty rows and duplicate rows

  • Apply case transformations (UPPERCASE, lowercase, Capitalize)

  • Find and replace values (with regex support)

Privacy

All processing happens in your browser. Your CSV data is never uploaded to any server.

How to Use the CSV to JSON Converter

Step 1 — Load Your Data

Drag and drop a .csv or .tsv file onto the upload area, or click to browse. Alternatively, click Enter Data to type values directly into the table editor.

Step 2 — Edit (Optional)

Use the toolbar to modify your data before conversion. Insert or remove rows and columns, transpose the table, deduplicate rows, or apply bulk case changes.

Step 3 — Choose Data Format

In the Properties panel, select one of four formats: Array of Object, 2D Array, Column Array, or Keyed Array.

Step 4 — Configure Options

  • Root Object Name — wrap output in a named key

  • Indent Size — choose 2 spaces, 4 spaces, 8 spaces, or tabs

  • Parse JSON — enable to parse embedded JSON strings in cells

  • Minify Output — enable for compact single-line output

Step 5 — Convert

Click Convert. The JSON output appears in the Output Data panel.

Step 6 — Copy or Download

Click Copy to Clipboard to paste the JSON into your code, or use Download File (Premium) to save the .json file.

Use Cases

  1. API development — Convert seed data from spreadsheets into JSON for mock servers and test fixtures

  2. MongoDB imports — Generate JSON documents for mongoimport or MongoDB Compass

  3. Frontend development — Convert CSV datasets into JSON for React/Vue/Angular applications

  4. NoSQL migration — Transform relational CSV exports into document-oriented JSON

  5. Data visualization — Feed JSON data into D3.js, Chart.js, or Plotly

  6. Configuration generation — Convert parameter tables into JSON config files

  7. Log processing — Parse CSV logs with embedded JSON fields using the Parse JSON option

Frequently Asked Questions (FAQ)

  • What JSON output formats does the CSV to JSON converter support?

    The converter supports four formats: Array of Objects (each row becomes a JSON object with header keys), 2D Array (headers and rows as nested arrays), Column Array (each column as a key with an array of values), and Keyed Array (first column values as keys mapping to row objects).

  • What does the Parse JSON option do?

    When enabled, Parse JSON detects JSON-formatted strings inside CSV cells and parses them into actual JSON objects rather than leaving them as escaped strings. This is useful for CSV files that contain embedded JSON data, such as API exports or log files.

  • Does the tool upload my CSV data to a server?

    No. All conversion happens entirely in your browser. Your files are never uploaded, transferred, or stored on any server.

  • What is the difference between Array of Objects and Keyed Array?

    Array of Objects produces a flat array where each element is a row object keyed by column headers. Keyed Array uses the first column's value as the key for each row, creating a dictionary/map structure for O(1) lookup by the first column value.

  • What is the Root Object Name option?

    Root Object Name wraps the entire JSON output in a named key. For example, entering 'employees' produces {\"employees\": [...]} instead of a bare array. This is useful when the consuming application expects a specific top-level key.

  • What is the Minify Output option?

    Minify Output removes all whitespace from the JSON, producing compact single-line output. This reduces file size by 30–50% and is useful for API payloads, database storage, and production configuration files.

  • Can I edit my CSV data before converting to JSON?

    Yes. After uploading your file, a full table editor opens where you can add or remove rows and columns, transpose the table, deduplicate rows, change text case, and find and replace values.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.

Excel To JSON

Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.
Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.

Excel To CSV

Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.
Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.

Excel To SQL

Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.
Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.

Excel To ASCII Table

Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.