PlayWithJSON

CSV to JSON / JSON5 Converter Online

JSON & JSON5 Ready

Convert CSV / TSV files to structured JSON objects, 2D matrix arrays, or human-friendly JSON5.

Delimiter:
Structure:
Output Format:
Input CSV / DelimitedCSV / TSVReady
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Output JSONjson-2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Mode: CSV ➔ Standard JSON Array
5 rows • 8 cols
100% Client-Side • In-Memory Zero Latency

CSV to JSON & JSON5 Converter Online — Spreadsheet to JSON

Convert CSV (Comma-Separated Values) and TSV (Tab-Separated Values) spreadsheets into clean, structured JSON or human-friendly JSON5 arrays online. Ideal for software engineers, database admins, and frontend developers importing spreadsheet datasets into web applications, REST APIs, or NoSQL databases.

PlayWithJSON handles quote escaping, multi-line cells, custom delimiters (comma, semicolon, tab, pipe), auto type inference (numbers, booleans, null values), and output modes including Array of Objects, 2D Matrix arrays, and JSON Lines (NDJSON). Everything executes 100% locally in your browser for absolute privacy and zero latency.

{}

Why Use PlayWithJSON?

  • Instant CSV / TSV to JSON and JSON5 conversion in your browser
  • Dual output formats: strict RFC 8259 JSON and human-friendly JSON5
  • Automatic type inference: converts "42" to numbers and "true" to booleans
  • Multi-delimiter support: Comma (,), Semicolon (;), Tab (\t), Pipe (|)
  • Array of Objects [{...}] and 2D Matrix [[...]] structural modes
  • 100% Client-side processing — your confidential data never leaves your computer

Key Features of Our CSV to JSON Converter

Dual JSON & JSON5 Export

Export standard JSON with 2-space or 4-space formatting, minified compact strings, or relaxed JSON5 with single quotes and unquoted keys.

Smart Type Inference

Automatically detects integers, floating decimals, booleans (true/false), and null values rather than treating everything as strings.

RFC 4180 Escaped Quotes

Accurately handles double-quote escaping (""), commas inside quotes, and multi-line cell values without corrupting rows.

Array of Objects or Matrix

Map headers to object keys, or generate a lightweight 2D array matrix for statistical and math operations.

How to Convert CSV to JSON or JSON5 Online

1

Paste or Upload CSV Data

Paste your comma-separated or tab-separated text into the left editor or click Upload to select a .csv file.

2

Choose Delimiter & Output Options

Select your delimiter (comma, semicolon, tab, pipe), toggle Header Row detection, and select Array of Objects or Matrix mode.

3

Select Target JSON Format & Export

Pick standard JSON (2 or 4 spaces), minified JSON, or relaxed JSON5. Copy the output or download as a .json or .json5 file.

CSV to JSON / JSON5 Conversion Example

Input: CSV Spreadsheet
id,name,role,salary,remote 101,Sarah Connor,Lead DevOps,125000,true 102,Alex Mercer,Principal Designer,98000,false
Output: Structured JSON Array
1[
2 {
3 "id": 101,
4 "name": "Sarah Connor",
5 "role": "Lead DevOps",
6 "salary": 125000,
7 "remote": true
8 },
9 {
10 "id": 102,
11 "name": "Alex Mercer",
12 "role": "Principal Designer",
13 "salary": 98000,
14 "remote": false
15 }
16]

Correct vs Malformed CSV Formatting

Unescaped Commas and Quotes
1sku,description,price
2PROD-1,Wireless mouse, black, 29.99 # Unquoted comma splits the column into 4 instead of 3
CSV Parsing Error: Row 2 has 4 fields, but header defines 3 columns. Values with commas must be wrapped in quotes.
Proper RFC 4180 Escaped Quotes
1sku,description,price
2PROD-1,"Wireless mouse, black",29.99

Compatibility & Supported Spreadsheet Standards

Comma-separated values (CSV) standard RFC 4180 parsing
Tab-separated values (TSV) from Excel and Google Sheets
European semicolon (;) delimited data formats
Pipe-separated (|) data exports from mainframe databases
Automatic type inference for numbers, booleans, and nulls
Array of objects with header key mapping
2D matrix array format [[row1], [row2]]
Standard JSON formatted (2 & 4 spaces) and minified
Clean JSON5 syntax with single quotes & unquoted keys
Newline Delimited JSON (NDJSON / JSON Lines) export
100% Client-side zero telemetry in-browser parsing
Frequently Asked Questions

Frequently Asked Questions about CSV to JSON

When "Parse Numbers & Booleans" is active, numeric digits like "125000" or "49.99" are converted to actual JavaScript numbers, and "true" or "false" become boolean values instead of strings.

More JSON Developer Tools

View All Tools

JSON Formatter

Format, validate and inspect JSON data

JSON5 Formatter

Format and validate JSON5 with comments

JSON ↔ JSON5

Convert between JSON and modern JSON5

JSON to TypeScript

Generate TypeScript interfaces from JSON

JSON to Zod

Generate Zod schemas from JSON

Text to JSON

Convert text and schemas into structured JSON

JSON Sorter Online

Sort JSON keys alphabetically and order arrays

JWT Decoder Online

Decode JWT header, payload and expiration

JSON Stringify Online

Escape quotes and stringify or unescape JSON

Mock JSON Generator

Generate realistic mock data for APIs and testing

JSON to CSV

Export structured JSON arrays into CSV spreadsheets

JSONPath Tester

Query and filter JSON data with path expressions

JSON Schema Generator

Generate JSON Schema from sample JSON

JSON Diff & Compare

Compare two JSON objects and find differences

JSON ↔ YAML

Convert JSON/JSON5 to YAML and back with comments

JSON ↔ XML

Convert JSON to XML and XML to JSON with attributes

YAML to CSV

Convert YAML lists and objects into spreadsheets

CSV to JSON / JSON5

Convert CSV/TSV to JSON or JSON5 with type parsing

JSON to BigQuery

Generate BigQuery Schema JSON and CREATE TABLE DDL

JSON to GraphQL

Generate GraphQL SDL types, queries, and inputs

JSON to MySQL

Generate MySQL CREATE TABLE DDL and INSERT queries

JSON to PostgreSQL

Generate PostgreSQL CREATE TABLE DDL, JSONB and INSERTs

JSON Flattener

Flatten nested JSON to dot notation or unflatten back

JSON Tree Visualizer

Interactive SVG mindmap graph and collapsible node tree

JSON Minifier Online

Compact and compress JSON by stripping whitespace

JSON Token Counter

Calculate LLM tokens (GPT-4o, Claude) and API costs

Broken JSON Repair

Automatically heal broken and truncated AI/LLM JSON