Convert CSV to JSON, JSON to CSV, and Excel to either, right in your browser. Multi-sheet .xlsx support, row and column counts, copy or download results.
Paste your data or upload a file and this converter transforms it as you type. Six conversions are supported in both directions across three formats: CSV to JSON, JSON to CSV, Excel to JSON, Excel to CSV, CSV to Excel, and JSON to Excel. It reports how many rows and columns it parsed, flags malformed input with a specific error rather than failing silently, and lets you copy the result or download it as a .json, .csv, or .xlsx file. All parsing happens in your browser — no file ever leaves your machine, which matters when the spreadsheet contains customer records, exported logs, or anything else you are not allowed to upload to a third-party service.
The conversion between tabular and hierarchical formats is a daily chore in a few specific jobs. Developers seeding a test database from a spreadsheet a colleague sent. Analysts pulling an API response into something Excel can pivot. Sysadmins turning an exported user list into JSON for a bulk provisioning script. Anyone who has been handed a .xlsx file and needs the data in a format a program can read. This tool is built to do that in a few seconds without installing a library or writing a throwaway script.
.xlsx or .xls file, since a spreadsheet is binary and cannot be pasted as text..xlsx workbook when you click Download Excel.A Load Sample button fills in a small four-column example for the CSV and JSON modes if you want to see the shape of the output before committing your own data.
The converter treats the first row of your CSV as the header row and uses those values as JSON object keys. Each subsequent row becomes one object in an array. Header names are trimmed of surrounding whitespace, which quietly fixes the single most common cause of mismatched keys — a stray space after a comma in the header line.
Given this CSV:
name,age,city
John Doe,30,New York
Jane Smith,25,London
You get:
[
{ "name": "John Doe", "age": "30", "city": "New York" },
{ "name": "Jane Smith", "age": "25", "city": "London" }
]
Note that age comes out as the string "30", not the number 30. That is deliberate and worth understanding: CSV has no type system. Every field is text, and any conversion of “looks like a number” into an actual number is a guess. That guess is wrong for zip codes with leading zeros, for phone numbers, for product SKUs, and for long numeric IDs that lose precision when parsed as IEEE 754 doubles. Preserving strings keeps your data intact; cast the fields you actually want as numbers in whatever consumes the JSON.
Empty lines are skipped rather than becoming empty objects. Quoted fields containing commas, embedded quotes, and newlines inside quotes are handled correctly by the underlying RFC 4180-style parser — this is exactly where hand-rolled “split on comma” code breaks.
The input must be a JSON array of objects. That is the only structure with a well-defined tabular representation: each object is a row, each key is a column. If you pass a single object, a bare array of values, or a deeply nested document, the tool reports that the JSON must be an array of objects rather than producing a misleading half-table.
Column headers are derived from the object keys, values are quoted where necessary, and embedded commas, quotes, and newlines are escaped so the output round-trips cleanly back to JSON.
The genuine limitation here is nesting. A field whose value is itself an object or an array has no natural single-cell representation. If your JSON has structure like {"user": {"name": "...", "email": "..."}}, flatten it before converting — typically into user.name and user.email columns — or the nested values will not land in the table the way you expect. This is a property of the formats, not a defect in any particular converter: CSV is flat and JSON is not.
Excel input is read entirely in the browser. Both the modern .xlsx format and the legacy .xls format are supported, and multi-sheet workbooks are handled — every sheet name is listed and you can switch between them without re-uploading.
Dates are formatted as yyyy-mm-dd rather than emitted as Excel’s internal serial numbers, so a cell showing 15 March 2024 becomes 2024-03-15 instead of 45366. This is one of the more frequent surprises when moving data out of Excel, and normalising to ISO order also makes the result sortable as text.
Excel output is generated as a genuine .xlsx workbook with a single sheet, not a CSV file with a spreadsheet extension. That distinction matters if the file is going to be consumed by another program rather than opened by a human.
The file size limit is 10 MB. That is a browser-memory constraint, not an arbitrary paywall — parsing happens in a single tab with your data held in RAM. For a larger CSV, split it first with the CSV splitter and convert the pieces.
data or results, extract that array first.To inspect a CSV as a sortable table before converting it, use the CSV viewer. To break a large file into manageable chunks, use the CSV splitter. Once you have JSON, the JSON formatter will pretty-print, minify, and validate it. For conversions beyond these three formats — YAML, XML, and TOML among them — see the data format converter.
No. CSV parsing, JSON serialisation, and Excel reading and writing all run as JavaScript inside your browser. No file or pasted text is sent to a server, and nothing is stored.
CSV has no types, so every value arrives as text. Converting anything that looks numeric would corrupt zip codes with leading zeros, phone numbers, and IDs longer than 15 digits. Cast the specific fields you need in your own code.
Not usefully, for the JSON-to-CSV direction. CSV is a flat format with no representation for a nested object or array in a single cell. Flatten your structure into dotted column names before converting.
10 MB. The limit exists because the entire file is held in browser memory during parsing. Split larger files and convert them in parts.
Yes. All sheet names are detected and a selector lets you convert any sheet. Each conversion produces one sheet’s worth of data.
They are converted to yyyy-mm-dd strings rather than left as Excel serial numbers, so the output is human-readable and sorts correctly as text.
The parser detects the delimiter automatically in most cases, but if a semicolon-separated file parses as a single column, do a find-and-replace to commas first — being careful with any decimal commas in the data.
Yes. The first row is treated as headers and becomes the JSON keys or the Excel column titles. A file without headers will lose its first data row into the header position, so add one before converting.
CSV to JSON conversion transforms tabular data from Comma-Separated Values format into JavaScript Object Notation format, and vice versa. CSV is the universal format for spreadsheet data—simple rows and columns separated by delimiters. JSON is the standard for web APIs and modern applications—nested, typed data structures. Converting between these formats is a daily task for developers, data engineers, analysts, and anyone integrating spreadsheet data with web services.
CSV excels at flat, tabular data but cannot represent nested structures, typed values, or hierarchical relationships. JSON supports nesting, arrays, booleans, numbers, and null values but is verbose for simple tables. Understanding when and how to convert between them—and the edge cases involved—is essential for reliable data pipelines.
| Feature | CSV | JSON |
|---|---|---|
| Structure | Flat rows and columns | Nested objects and arrays |
| Data types | Everything is a string | String, number, boolean, null, object, array |
| Headers | First row (by convention) | Object keys in every record |
| Nesting | Not supported | Unlimited depth |
| File size | Compact | Larger (key names repeated) |
| Readability | Easy in spreadsheets | Easy in code editors |
| Standards | RFC 4180 | RFC 8259 |
Conversion challenges:
CSV (Comma-Separated Values) is a flat text format: rows and columns, first row often headers, simple structure. Example: name,age\nJohn,30. JSON (JavaScript Object Notation) is hierarchical: supports nested objects and arrays, types (strings, numbers, booleans, null), more flexible. Example: [{"name":"John","age":30}]. CSV best for: spreadsheet data, simple tabular exports, Excel compatibility. JSON best for: APIs, complex nested data, web applications, preserving data types. This tool converts between both formats instantly.
Common delimiters: comma (,), semicolon (;), tab (\t), pipe (|). Specify delimiter when parsing. Handle quotes: fields with commas must be quoted "value, with comma". Escape quotes: double quotes inside quoted fields "She said ""hi""". Handle newlines: quoted fields can contain newlines. UTF-8 encoding: supports international characters. Excel CSV quirks: may use different delimiters based on locale. This tool auto-detects delimiters and handles quoted fields correctly. Always validate output for edge cases.
Nested JSON can't directly map to flat CSV. Solutions: (1) Flatten nested objects using dot notation: {user: {name: "John"}} → user.name column. (2) JSON.stringify nested objects: keep as JSON string in CSV cell. (3) Create separate CSV files for nested arrays (normalized tables). (4) Repeat parent data for each nested item (denormalized). Example: {name:"John", orders:[1,2]} could become two rows with repeated name. Choose based on use case: analysis (flatten), re-import (stringify), database (normalize). This tool offers flattening options.
Type conversion issues: CSV treats everything as strings, JSON distinguishes types. Numbers become strings: "123" instead of 123. Solution: parse numeric columns. Booleans: "true" vs true. Date handling: CSV has no date type, must parse. Empty fields: empty string vs null vs undefined. Headers: missing or malformed headers break conversion. Special characters: unescaped quotes, newlines in fields. Large files: memory limits for browser-based tools. Encoding: non-UTF-8 causes garbled text. This tool handles type inference and provides validation feedback.
Streaming approach: don't load entire file into memory, process line-by-line or in chunks. Node.js: use streams (csv-parser, JSONStream). Browser: use FileReader with chunking, or Web Workers for background processing. Batch processing: convert in batches of 1000-10000 rows. Memory management: clear processed data, garbage collection between batches. Server-side: handle large files (100MB+) server-side, not in browser. Compress output: gzip JSON reduces size 70-90%. Database import: consider direct CSV import to database, then export JSON from queries for very large datasets. This tool handles files up to browser memory limits (~100MB).
Array of objects (most common): [{name:"John",age:30},{name:"Jane",age:25}]. Each CSV row → JSON object, CSV headers → object keys. Object with arrays (columnar): {names:["John","Jane"],ages:[30,25]}. Each CSV column → array. Better for data analysis. Nested structure: group related fields: [{name:"John",contact:{email:"...",phone:"..."}}]. Use for complex datasets. With metadata: {headers:["name","age"],data:[["John",30],["Jane",25]]}. Preserves structure info. Choose based on API expectations or data processing needs. Most APIs expect array of objects format.
CSV has no type information - everything is a string. Type inference strategies: (1) Numbers: check if string is valid number, convert with parseFloat() or parseInt(). (2) Booleans: check for "true"/"false", "yes"/"no", "1"/"0". (3) Dates: detect date patterns, convert with Date.parse(). (4) Nulls: treat empty strings or "null" as null. (5) Provide type hints: specify column types in UI or via schema. (6) Keep as strings: safest for round-trip conversion. Libraries: csv-parse with cast option, Papaparse with typed columns. This tool offers automatic type detection or manual type specification per column.
CSV headers become JSON keys. Best practices: (1) Use lowercase: first_name not First Name. (2) No spaces: use underscores or camelCase. (3) No special characters: avoid @#$%. (4) Descriptive names: email not e. (5) Consistent naming: pick snake_case or camelCase and stick to it. (6) Avoid reserved words: don't use class, type if possible. (7) Unique headers: no duplicate column names. Transform headers: this tool can normalize headers automatically. Common transformations: trim whitespace, lowercase, replace spaces with underscores. Handle missing headers: generate column_1, column_2 for headerless CSV.