CSV to JSON - DigiKitApp
Convert CSV text into a JSON array.
When should you use this?
Use this when you need to bring data from an Excel/CSV table into an app or API in JSON format.
When shouldn't you use this?
If the CSV's column headers are inconsistent or blank, the conversion can produce messy JSON keys; cleaning up the headers first gives a cleaner result.
Step-by-step
- Export your table as CSV or copy the cells. Make sure the first row holds the column headers.
- Paste the text into the CSV text field.
- Click Run.
- Check that each row has become its own object keyed by the headers, then copy the JSON array to wherever you need it.
Example
You have a small shop's product list with the columns sku, name and stock, and you want it as test data for a web app. Paste the CSV and convert it, and each product becomes an object with sku, name and stock fields, all wrapped in a single array inside square brackets. Save that as a JSON file in the app's data folder, or paste it into the body of an API request.
Simplifying the headers before converting saves trouble later. A key like product_name is easier to use in code than "Product Name" with a space in it.
The difference between CSV and JSON
CSV is a simple table format that stores data as rows with comma-separated columns; it is common in Excel and database exports. JSON is a structured format of objects and lists that web applications speak. The first CSV row usually holds the column names and each following row becomes an object.
Tips when converting
- Make sure the first row is a header; otherwise the keys come out wrong.
- If a cell contains a comma, the value must be in double quotes.
- Some Excel versions use a semicolon as the separator in Turkey; check the delimiter.
- Codes that look like numbers (leading zeros) can lose their type after conversion.
Things to keep in mind
- Excel set to some European locales, Turkish included, exports CSV with semicolons instead of commas, because the comma is the decimal mark. If each row ends up crammed into one field, that's the likely cause.
- Cells that contain commas, like an address, need to be wrapped in quotes. Otherwise the row splits into extra columns.
- Check whether numbers and dates come out as strings or numbers. If the receiving system expects numbers, you may need to fix the types.
- If the file wasn't saved as UTF-8, accented letters can come out garbled. Choose the UTF-8 option when exporting.
Frequently asked questions
Is the code/data I enter stored anywhere?
No, nothing is sent to a server or stored; processing happens entirely in your browser.
Does it work with large inputs?
Yes, though performance may degrade with very large inputs (several MB or more).
Is this tool free?
Yes, it's completely free for core use and requires no account.