Convert CSV to JSON Comma-Separated Values ↔ JavaScript Object Notation Free Online Secure
Drop your CSV file in and take away JSON. It is read and written here, in your browser, so the file never leaves your device — and what the crossing keeps, and what it cannot, is written out below rather than left for you to discover.
Convert your file
Drop your CSV file here, or choose one.
Your file never leaves this device. Everything runs in your browser.
Nothing uploaded
Convert from CSV
Convert to CSV
Where these formats come from
CSV is the oldest and the least standardised: a table written as lines of text, in use since the 1970s and only described in writing in 2005, by which time every program had already decided for itself what the separator was and when to put quotation marks. XML grew out of SGML in 1998 for documents that must carry strict structure and be checked against a schema. JSON was pulled out of JavaScript by Douglas Crockford around 2001, deliberately stripped down to objects, arrays, numbers and strings — and that minimalism is why it took over the web. YAML is its readable cousin, where indentation does the work that brackets do elsewhere. The one thing that matters when converting between them: CSV is flat, a grid of rows and columns, while JSON, XML and YAML are trees.
Where you meet them
CSV is what a spreadsheet exports and what an accountant, a shop platform or a bank statement will hand you. JSON is what web services speak and what configuration files are increasingly written in. XML survives in older enterprise systems, in invoicing standards and inside the office formats themselves. YAML is where humans write settings by hand. Converting between them is the daily work of moving data from where it was produced to where it is needed.
Questions people ask
My CSV opened as one column in Excel. Why?
Because your spreadsheet expected a different separator. Excel follows the list separator of the computer's regional settings, which is a semicolon anywhere the comma is already the decimal mark — that is, most of continental Europe. A file separated by commas then looks like a single column of text. Use the import dialogue and state the separator explicitly, rather than double-clicking the file. The same regional setting is why 3.5 sometimes arrives as a date.
Why can't my nested JSON become a tidy spreadsheet?
Because a spreadsheet is flat and JSON is a tree. A row can hold one value per column; a JSON object can hold a list inside a field inside another list. Converting means choosing how to flatten that: either joining nested names into one long column heading, or repeating the parent row once for each child. Both are compromises, and neither can be undone automatically — which is why going back from the spreadsheet to the original shape usually needs a human decision.
Does the file lose quality?
It depends on what the two formats can hold. Converting between formats that store the same thing — a PNG to a BMP, a WAV to a FLAC — loses nothing. Converting into a format that throws information away to save space, such as JPEG or MP3, loses a little every time, and converting back does not bring it back. Where a choice exists, this page errs towards keeping the original quality rather than making the smallest file.
Is my file uploaded anywhere?
No. The conversion happens inside your browser, on your own machine; the file never leaves it and there is no server here that could receive it. That is why a large file is limited by your own memory rather than by an upload, and why nothing you convert can appear in anybody's logs — including ours. The audio and video tools do fetch their conversion engine from this site the first time you use them, some thirty megabytes once; after that the work still happens entirely on your machine.
Why people convert CSV to JSON
CSV is the format of spreadsheets and exports: a plain table, one row to a line, cells separated by commas or semicolons. Every spreadsheet can save it and every database can produce it. JSON is the format of programs: a structured text that web services, applications and scripts read directly. When a table has to feed a program, a website, a mobile app, a chart library or an API, a CSV is not what the program wants. It wants JSON. That is why people convert CSV to JSON: they have the data in a table, and the thing that will use it speaks JSON.
The situations are common. A developer with a product list kept in a spreadsheet, which a web page should load. A designer with the data for a chart. A teacher who has marks in a table and wants a script to process them. A shop owner who must upload a catalogue to a service that accepts only JSON. In every case the table is already tidy, and what is missing is only the change of language.
This page converts CSV to JSON in your browser. Your file is read and written here, so it never leaves your device, which matters for customer lists, pupils' records and anything else personal. And the page tells you in advance what the crossing keeps and what it cannot, rather than leaving you to discover it. Below you will find how the conversion works, how values are typed and what to watch for with separators.
How the conversion works
The first row gives the keys
Your CSV is read inside your browser. The first row is taken as the header, and its cells become the keys. Every other row becomes a record, an object in which each key is paired with the value in the same column. The result is a list of records, which is the shape that programs expect from a table.
Quoted fields are kept whole
CSV has traps, and they are handled. Quoted fields keep their commas, their line breaks and their doubled quotes. A cell such as "Smith, John" stays one value, and a cell that contains a line break stays one value too. A file that ends without a final newline still yields its last row, so nothing is lost at the end.
Every cell is kept
Every cell makes it into the result. Empty cells are kept as empty values, so each record has the same keys and the structure is regular.
What is kept
All the rows and all the columns
Every cell is kept, with the first row as the keys. A table of 300 rows and 8 columns gives a list of 300 records with 8 keys each.
The text of each cell exactly
The content of each cell is kept exactly, including spaces inside it, accented letters and symbols. Nothing is trimmed, translated or reformatted behind your back.
Commas, quotes and line breaks inside cells
Values that contain commas, quotation marks or line breaks survive intact, because the quoting rules of CSV are followed when reading the file.
How values are typed
A CSV cell is text and nothing more
A CSV cell is text and nothing more. It does not say whether it is a number, a date or a word. So the types are read back by rule and not by magic: plain numbers, true, false and null are recognised, and everything else stays a string. A cell that holds 42 becomes the number 42, a cell that holds true becomes the value true, and a cell that holds Berlin stays the string Berlin.
Why leading zeros survive
Because only plain numbers are converted, a leading zero, a phone number or an identifier survives intact. A postcode written 01234 is not a plain number, so it stays the string 01234, and the zero is not lost. This is a deliberate protection: turning such values into numbers would quietly damage them.
Dates stay as text
Dates are not guessed. A cell that holds 2026-03-14 stays the string 2026-03-14. JSON has no date type, so the receiving program will decide what to do with it, and that is the safer place for the decision.
What you should know before you convert CSV to JSON
The separator is guessed from the first line
The separator is guessed from the first line: comma or semicolon, whichever is more frequent outside quotes. This covers the two common cases, since spreadsheets in some countries save with semicolons. If your file uses a tab or another character, replace it with a comma first.
The header must be on the first row
The first row becomes the keys, so make sure it is the header. If your file has a title, a blank line or notes above the table, delete them first, or the keys will be wrong.
Duplicate column names
Two columns with the same name cannot both be keys of one object, because a key can appear only once. Give each column a distinct name before you convert CSV to JSON.
How to convert CSV to JSON here
Add your file
Drop the CSV onto the page or pick it from your device. It is read inside your browser and is not uploaded.
Convert
Press the button. A file of ordinary size takes a moment. Leave the page open until it is done.
Download and check
Download the JSON and open it in a text editor. Look at the first record and the last, and check that the keys are the names you expect and that the values have the types you need.
A closer look at CSV and JSON
Tables and trees
CSV describes a table: rows and columns, nothing more. JSON describes a tree: objects containing values, which may be objects or lists in turn. A table is the simplest kind of tree, a list of records that all have the same keys. So the conversion from CSV to JSON is straightforward in structure, and the interesting questions are about types, which is why the rules above matter.
Why JSON is easier for programs
A CSV file is fragile: change a separator or a quoting habit and every reader may disagree on how to read it. JSON has a strict grammar, a clear idea of strings, numbers, booleans and null, and ready-made readers in every programming language. A program that receives JSON needs no guesswork. That is why many services insist on it.
Size
JSON repeats the key names in every record, so the file is larger than the CSV it came from. For a table of thousands of rows, expect the JSON to be considerably bigger. This is the price of making every record self-describing.
Common situations in detail
Feeding a web page or an app
A list of products, locations or events kept in a spreadsheet can be converted to JSON and loaded by a page. You edit the table in the spreadsheet you know, and let the page read the result.
Data for charts and maps
Chart and map libraries usually take JSON. Convert CSV to JSON, point the library at the file and the chart draws itself from your table.
Uploads to services and APIs
Services that import catalogues, contacts or settings often accept JSON only. A spreadsheet can be turned into the right file here, and uploaded.
Scripts and automation
A script that processes records is simpler when it reads JSON. Converting once spares you from writing a CSV reader and worrying about quotes.
Practical advice before you convert CSV to JSON
Tidy the header row
Use short, clear, unique names, without spaces if the receiving program prefers it. The names become keys, and programs refer to keys by name.
Remove notes and totals
A spreadsheet often has a title above the table or a total row below. Delete them before you export the CSV, or they will become records.
Check the separator
If your spreadsheet saved with semicolons, the page guesses correctly. If the first line contains both commas and semicolons in the text, check the result carefully.
Think about identifiers
If a column holds codes that look like numbers but must stay text, such as codes with leading zeros, the rules protect them. But a column of plain numbers that you need as text will arrive as numbers, so adjust it in the program that reads the JSON.
Questions people ask before converting
Why are some of my values numbers and others strings?
Because plain numbers, true, false and null are recognised, and everything else stays a string. A leading zero or a letter makes the cell a string.
Why did a zero at the start survive?
By design. Only plain numbers are converted, so a postcode or a phone number keeps its zero.
My file uses semicolons. Will that work?
Yes. The separator is guessed from the first line, comma or semicolon, whichever is more frequent outside quotes.
Are dates converted?
No. JSON has no date type, so a date stays the text it was.
Is my file uploaded?
No. The conversion runs in your browser and the file never leaves your device.
Can I go back to CSV?
Yes. JSON to CSV turns a list of flat records into a table again.
Choosing wisely when you convert CSV to JSON
JSON, XML or YAML?
JSON suits programs and web services. If a system expects markup, JSON to XML can follow. For configuration files that people edit by hand, JSON to YAML reads more comfortably.
Spreadsheet source
If your data is in an Excel workbook and not in a CSV, XLSX to JSON reads the workbook directly and handles several sheets.
Keep the table
The CSV is the master for people who maintain the data. Keep it, and convert again when it changes.
Getting a good result after the conversion
Validate the JSON in a viewer
Open the result in an editor that understands JSON and collapse the records. If the structure looks like what you expect, it is sound.
Compare a few records with the source
Take a few rows in the middle and check them against the table. It takes a minute and tells you the conversion is faithful.
Minify for publishing
If the file will be loaded by a web page and is large, tools exist that remove whitespace and make it lighter. The data stays the same.
Preparing your CSV so that it converts well
Save with a standard encoding
Spreadsheets can save CSV in several character sets. Choose a Unicode encoding so that accented letters and symbols arrive correctly, particularly if your data includes names in more than one language.
Keep each column to one kind of thing
When you convert CSV to JSON, a column that holds numbers in most rows and words in a few will produce a mixture of types. Clean the odd ones so that each column means one thing.
Test with a small piece first
If your file is large, take the first twenty rows into a test file and convert that. A quick look at the result shows whether the keys and types are what you expect.
Using the result after you convert CSV to JSON
Loading it in a web page
Once you convert CSV to JSON, a page can fetch the file and turn it into a list, a table or a set of markers on a map with a few lines of script. Because the file is plain text, you can host it beside the page, and a change to the data needs only a new conversion and a new upload.
Checking numbers and strings
The program that reads the JSON will see numbers where the table held plain numbers and strings everywhere else. If a column of amounts has a stray word in one row, that row will carry a string, which may surprise a calculation. A quick scan of the column in the table before you convert saves a hunt for the bug later.
Handling empty cells
An empty cell arrives as an empty value for its key. Programs differ in how they treat that: some see an empty string, some see nothing. If it matters, decide in the program how to read blanks, and do not rely on the table to say.
Large tables
A table of many thousands of rows gives a large file. If a page must load it, consider splitting the data into pages, or loading only the part that is needed, so that visitors are not made to wait.
Privacy and handling
Why local conversion matters for data
Data files often hold what is private: customers, pupils, addresses, prices. Many online converters upload your file to a server, process it and send back the result, and for a while a copy lives on a machine you do not control. Here your own browser does the work, so the data stays on your device.
What happens when you leave
When you close the page, the converted file disappears from the browser, so download it first. Nothing about your data is kept.
If something goes wrong
The keys are wrong
The first row was not the header. Remove any title or blank lines above the table and convert again.
All the data is in one key
The separator was not what the page guessed, perhaps a tab. Replace it with a comma.
The page freezes with a large file
Everything runs on your device, and a large file needs memory. Try again on a computer, or split the data.
Related tools
The same family of tools covers the neighbouring jobs. To go back, use JSON to CSV. For Excel workbooks, XLSX to JSON and JSON to XLSX are at hand. For other formats of structured data, there are JSON to XML, XML to JSON, JSON to YAML and YAML to JSON. When the figures are in a PDF, PDF to XLS rebuilds a table from the page.
A worked example
Say you keep a list of 120 shops in a spreadsheet, with a name, a city, a postcode and a phone number, and your website should show them on a map. You save the sheet as CSV, drop it here and press the button. A moment later you download a JSON with 120 records. The postcodes with a leading zero are intact, because they are strings. You place the file beside the page, and the map library reads it. When a shop moves, you edit the spreadsheet and convert again.
A short checklist
Before converting
Put the header in the first row. Remove titles and totals. Give each column a unique name.
While converting
Stay on the page until the file is ready.
After converting
Open the JSON, check the keys and a few records, and keep the CSV as your master.
Common mistakes
Leaving a title above the header
The first row becomes the keys. A title there ruins them.
Expecting dates to be converted
Dates stay text. Let the receiving program interpret them.
Deleting the CSV
Keep it. It is the version you can edit in a spreadsheet.
Your data stays on your device
The conversion happens locally. Your file is read by your own browser, rewritten there and handed back as JSON. Nothing is uploaded, so no copy ends up on a server and nobody else can read it. For data with private content, that is the safe way to convert CSV to JSON.
Summary
To convert CSV to JSON here, drop the file and press the button. It is read and written in your browser, so the file never leaves your device. Every cell is kept, with the first row as the keys. Quoted fields keep their commas, their line breaks and their doubled quotes, and a file that ends without a newline still yields its last row. A CSV cell is text and nothing more, so the types are read back by rule and not by magic: plain numbers, true, false and null are recognised, and everything else stays a string, which is why a leading zero, a phone number or an identifier survives intact. The separator is guessed from the first line, comma or semicolon, whichever is more frequent outside quotes.