What Is a CSV File? Delimiter and Turkish Character Problems, Converting CSV to JSON and SQL
Updated: October 13, 2026 · AracMerkezi
CSV (Comma-Separated Values) is the simplest format for storing tabular data as plain text. Each line is a record, and each column is a field separated by a delimiter such as a comma. Excel, Google Sheets, databases, and almost every programming language can read and write CSV.
A simple CSV example
name,age,city
Ayşe,30,Malatya
Mehmet,25,Ankara
The first line is the header; the following lines are records.
Comma or semicolon?
Being “comma-separated” is not universal. Excel with Turkish regional settings uses a comma as the decimal separator, so it mostly saves CSV with a semicolon. That is why, if all the data appears in a single column when you open a CSV, the problem is most likely a delimiter mismatch. The fix is to specify the delimiter explicitly or to choose the correct delimiter in the import wizard.
Quoting rules
If a field contains the delimiter, a double quote, or a line break, it is wrapped in double quotes. A double quote inside a field is doubled:
name,note
"Yılmaz, Ayşe","Said ""hello"" and left"
This rule prevents names with commas, like “Yılmaz, Ayşe,” from breaking the columns.
If Turkish characters get corrupted
If the letters “ş, ğ, ı” appear as “ç, ı” and the like, the file was saved as UTF-8 but opened with a different encoding. Excel sometimes wants a BOM (byte order mark) at the start of the file to recognize a UTF-8 file. Saving the file as “UTF-8 (with BOM)” or choosing UTF-8 as the encoding during import fixes the problem.
From CSV to JSON
Web applications usually work with JSON. The example above turns into this:
[{"name":"Ayşe","age":"30","city":"Malatya"}, {"name":"Mehmet","age":"25","city":"Ankara"}]
CSV has no type information; numbers may come through as text in the first conversion. Check the field types after conversion. For two-way conversion, use the JSON ↔ CSV Converter tool.
Markdown and HTML tables
When writing documentation, aligning a table by hand is tedious. CSV to Markdown Table produces a ready-made table with a header and separator row. To add it to a web page, CSV to HTML Table creates the appropriate <table> tags; characters such as < and & inside cells are safely escaped.
From CSV to SQL INSERT
To import a small dataset into a database, the CSV to SQL INSERT tool turns each row into an INSERT INTO table (columns) VALUES (...) statement. Single quotes in text values are doubled in accordance with SQL rules: O'Neil → 'O''Neil'.
Important warning: Always review the generated SQL before running it. Do not run commands generated from data that comes from untrusted sources directly on a production database; for large and regular imports, prefer the database's own import tools (for example, COPY or LOAD DATA).
Common mistakes
- Mistaking the header row for data.
- Not noticing that the number of columns is not equal in every row.
- Leading zeros (phone numbers, postal codes) disappearing in Excel; keep these fields as text.
- Mixing up date formats (DD.MM.YYYY, MM/DD/YYYY).
Step by step: exporting an Excel table safely
- Leave no merged cells or empty headers in your table.
- Set columns such as phone numbers and postal codes to text format.
- Use File → Save As → CSV UTF-8.
- Open the file in a text editor and look at the first lines; verify the delimiter and the Turkish characters.
- Before pasting into the converter, select the delimiter (comma or semicolon) in the tool.
Example: a problematic row
In a file with the header name;score;comment, the row Ayşe;90;Very good; but was late is read as four fields because of the semicolon in the comment. The correct form is Ayşe;90;"Very good; but was late". Quoting the field prevents the columns from shifting.
Which output should you choose, and when?
- JSON: To feed data to a web application or API.
- Markdown table: For READMEs and documentation.
- HTML table: To quickly add a table to a static page.
- SQL INSERT: To try a small table of a few hundred rows in a database.
Before using the output, compare the row count with the source; silently skipped rows are the most common cause of data loss.
Limitations
CSV cannot carry nested structures (objects, arrays); for hierarchical data, JSON or XML is more suitable. Browser-based tools may slow down with very large files.
Frequently asked questions
When I open a CSV, all the data is in one column. Why?
There is a delimiter mismatch; Turkish Excel mostly uses a semicolon. Choose the correct delimiter when importing.
Why do Turkish characters get corrupted in CSV?
The file was saved as UTF-8 but is being opened with a different encoding; saving as UTF-8 (with BOM) or choosing UTF-8 during import fixes it.
How is a field containing a comma written?
The field is wrapped in double quotes; a double quote inside the field is doubled.
Tools mentioned in this guide
More guides
- What Is JSON? Structure, Formatting, Validation and Finding Errors – What is JSON and how do you read and validate it? A nested example, a valid/invalid comparison table, number and date traps and the formatting difference.
- What Is Fake Test Data? A Guide to Safe Mock Data for Testing and Demos – What is fake test data and why not use real customer data? Reserved example.com domains, edge-case records, pagination math, and JSON/CSV and UUID use.
- How to Calculate Percentages: Six Question Types, Formulas and Examples – Percentage math: percent of a number, what percent one is of another, increase and decrease, percentage points and reverse percentages, with examples.
- How to Calculate VAT: VAT-Inclusive and VAT-Exclusive Formulas and Examples – How do you separate VAT from a VAT-inclusive amount or add it to a VAT-exclusive one? Formulas, a mixed-rate invoice, rounding gaps and shortcuts.
- How to Calculate Loan Payments: Formula, Step-by-Step Example and Interest vs. Principal Split – The monthly loan payment formula, a step-by-step example, the interest-versus-principal split and how to work back to the loan amount you can afford.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.