CSV'yi JSON'a Adım Adım Dönüştürme
Quick Answer
CSV'yi JSON'a dönüştürmek için: CSV verinizi CSV to JSON Converter'a yapıştırın, ilk satırın header olup olmadığını seçin ve Convert'e tıklayın. Araç CSV'yi parse eder ve nesnelerin JSON array'ini outputlar. Tüm işleme yerel olarak olur.
Introduction
CSV (Comma-Separated Values), tabular veri için yaygın bir formattır —elektronik tablolar, veritabanı exportları ve data science datasetleri genelde CSV kullanır. JSON (JavaScript Object Notation), web API'leri ve modern uygulamalar için standart formattır. CSV'yi JSON'a dönüştürmek tabular veriyi JavaScript'e yüklemenizi veya API'ye göndermenizi sağlar.
Step by Step
-
Open the CSV to JSON Converter
Go to the CSV to JSON Converter tool page. The tool accepts any CSV text as input, including values with commas inside quotes.
-
Paste your CSV data
Paste your CSV into the input textarea. A typical CSV has one row per line, with values separated by commas. The first row is often a header row containing column names.
-
Configure header handling
If your first row contains column names (headers), enable the 'First row is header' option. The tool will use these names as JSON keys. If disabled, each row becomes a JSON array of values.
-
Set the delimiter (if needed)
Most CSV files use commas, but some use semicolons, tabs, or pipes. If your file uses a different delimiter, set it in the options. The tool handles quoted values containing the delimiter correctly.
-
Convert and copy the JSON
Click Convert. The tool parses the CSV and outputs JSON. With headers, each row becomes an object like {"name":"Alice","age":"30"}. Copy the JSON to your clipboard for use in your application.
Examples
CSV with headers to JSON objects
Input: name,age,city
Alice,30,NYC
Bob,25,LA
Output: [
{"name":"Alice","age":"30","city":"NYC"},
{"name":"Bob","age":"25","city":"LA"}
]
CSV with quoted values containing commas
Input: name,note
Alice,"Hello, world"
Bob,"foo, bar"
Output: [
{"name":"Alice","note":"Hello, world"},
{"name":"Bob","note":"foo, bar"}
]
CSV without headers to JSON arrays
Input: Alice,30,NYC
Bob,25,LA
Output: [
["Alice","30","NYC"],
["Bob","25","LA"]
]
Common Problems
- All CSV values are strings in JSON —numbers like "30" stay as strings. Convert to numbers in your application with Number() or parseInt().
- Quoted values with embedded commas —a proper CSV parser handles quotes correctly; naive splitting on commas breaks on values like "Hello, world".
- Inconsistent row lengths —some rows may have fewer or more columns than the header. The tool pads missing values with null or truncates extra values.
- Encoding issues —CSV files from Excel may use BOM or different encodings. Save as UTF-8 before pasting.
Tips
- If your CSV has headers, enable the header option to get JSON objects with named keys —much more useful than arrays.
- Convert numeric strings to numbers in your application after conversion, since CSV has no type information.
- For large CSV files (10MB+), use a streaming parser instead of loading the entire file into memory.
- Use our CSV to JSON Converter for instant, private conversion —no data leaves your browser.