UFOZoo

CSV to JSON — Convert CSV to JSON Online Instantly

Convert CSV and TSV files to JSON format online. Supports custom delimiters, header parsing, and nested data structures. Download as .json file instantly.

Features

  • Instant CSV to JSON conversion — paste or type CSV data and get JSON output in real time
  • Support for comma (,), semicolon (;), and tab (\t) delimiters to handle regional CSV formats
  • Auto-detect delimiter mode — automatically identifies the most likely separator in your data
  • Customizable header row toggle — use the first row as JSON keys or generate automatic column names
  • Parse numbers option — converts numeric strings to actual JSON numbers for downstream processing
  • Parse JSON option — detects and converts embedded JSON strings (true, false, null, arrays, objects)
  • Output as JSON array (list of records) or JSON hash (keyed by first column)
  • Minify toggle — produce compact single-line JSON for smaller file sizes or API payloads
  • Table preview showing the detected CSV structure before conversion
  • Drag-and-drop file support — open .csv or .tsv files up to 10MB directly
  • One-click copy to clipboard — paste JSON into any editor, API client, or database tool
  • Save as .json file — download the converted data for use in Node.js, Python, or any programming language
  • Handles edge cases — quoted fields, escaped quotes, commas in values, multi-line cells
  • Entirely client-side processing — zero data sent to servers, works offline, safe for sensitive data

How to Use

  1. 1Paste your CSV data into the left input panel. The tool starts converting automatically as you type.
  2. 2Choose your delimiter: comma for standard CSV, semicolon for European formats, or tab for TSV files copied from Excel.
  3. 3Toggle 'Auto-detect' to let the tool automatically determine the best delimiter from your data.
  4. 4Switch between 'Include Headers' and 'No Headers' — headers become JSON keys, or auto-generated names (col1, col2) are used.
  5. 5Enable 'Parse Numbers' if you want values like 42 and 3.14 as JSON numbers instead of strings.
  6. 6Enable 'Parse JSON' to convert embedded JSON strings like true, false, null, [1,2], and {key: val} into native types.
  7. 7Choose Output format: 'Array' produces [{...}, {...}], 'Hash' uses the first column as object keys.
  8. 8Toggle 'Minify' to compact the JSON output into a single line — useful for API payloads.
  9. 9Preview your data in the table view on the right panel before saving or copying.
  10. 10Click 'Save' to download a .json file, or 'Copy' to paste the JSON directly into your code editor.
  11. 11Drag and drop a .csv file onto the input area for quick file conversion.
  12. 12Load example data by clicking the example buttons to try different CSV formats.

Frequently Asked Questions

What is the difference between CSV and TSV?

CSV (Comma Separated Values) uses commas as delimiters, while TSV (Tab Separated Values) uses tab characters. TSV is common when copying data from Excel, as clipboard data is stored in tab-separated format. This tool handles both formats — just select the correct delimiter or use auto-detect.

How do I convert CSV copied from Excel?

When you copy cells from Excel, the data is stored as TSV (tab-separated) in your clipboard. Simply paste it into the input area, select 'Tab' as the delimiter, and the tool will convert it to JSON automatically. Alternatively, enable auto-detect and the tool will identify the tab delimiter.

Should I enable 'Parse Numbers'?

Enable 'Parse Numbers' if you need numeric values as actual JSON numbers (e.g., 42 instead of "42"). This is useful when the JSON will be processed by JavaScript, Python, or other programming languages that expect numeric types. Keep it disabled if you want to preserve exact formatting like leading zeros (00123) or phone numbers.

What does 'Parse JSON' do?

When enabled, the tool detects values that look like JSON and converts them to native types. For example, the string 'true' becomes the boolean true, 'null' becomes null, '[1,2,3]' becomes an array, and '{"key":"val"}' becomes an object. This is useful when CSV cells contain structured data exported from databases.

What is the difference between Array and Hash output?

Array mode (default) produces a JSON array of objects: [{name: "Alice", age: 30}, {name: "Bob", age: 25}]. Hash mode uses the first column as the key: {"Alice": {age: 30}, "Bob": {age: 25}}. Use Hash when you need quick lookups by a unique identifier column.

How does auto-detect delimiter work?

Auto-detect analyzes your CSV data and counts occurrences of common delimiters (comma, semicolon, tab). It picks the delimiter that produces the most consistent column counts across rows. This works well for well-formed CSV but may misidentify if your data contains multiple delimiter types.

Can I convert large CSV files?

Yes, there is no strict file size limit. Files under 1MB convert instantly. Larger files (1-10MB) may take a few seconds depending on your device. For very large datasets (100K+ rows), consider using command-line tools like jq or Python for better performance. The tool processes everything in your browser — no uploads.

Does it handle special characters and quotes?

Yes. Fields containing the delimiter character, line breaks, or double quotes are properly handled following RFC 4180. Quoted fields preserve their content, escaped quotes (double-double quotes) are correctly parsed, and empty fields become null or empty strings as appropriate.

Is my data secure?

Absolutely. All conversion happens entirely in your browser using JavaScript. Your CSV data never leaves your device — there are no servers involved. You can disconnect from the internet after loading the page and it still works. This makes it safe for converting sensitive data like customer records, financial data, or API credentials.

Can I use the JSON output in my code?

Yes! The JSON output follows standard JSON format and can be directly used in JavaScript (JSON.parse), Python (json.loads), Node.js, or any programming language. Use 'Minify' mode for compact JSON suitable for API payloads, or keep it formatted for human readability in configuration files.

How do I handle CSV without headers?

If your CSV data does not have a header row, toggle 'No Headers' mode. The tool will auto-generate column names (col1, col2, col3, etc.). This is common for data exported from databases where column names are in a separate schema file.

Does it work on mobile devices?

Yes, the tool is fully responsive. On mobile, the input and output panels stack vertically. You can paste CSV data, adjust settings, and copy or save the JSON output. For best experience with large files, use landscape mode on tablets.

Related Tools