CSV / JSON Converter

Chuyển đổi giữa CSV và JSON.
CSV INPUT
KẾT QUẢ

Bidirectional

CSV to JSON and JSON to CSV.

Quote Handling

Properly handles quoted fields and commas.

Copy Result

One-click copy to clipboard.

Client-side

All processing in your browser. No data uploaded.

Giới thiệu về CSV / JSON Converter

The CSV to JSON Converter (and JSON to CSV Converter) handles one of the most common data transformation tasks in software development and data analysis. CSV (Comma-Separated Values) is the default export format from spreadsheet tools like Excel and Google Sheets, database query results, and analytics platforms. JSON is required by virtually every modern API and web application. Converting between them is essential for importing/exporting data, building data pipelines, and migrating between systems. Paste CSV data with a header row and get a clean JSON array of objects in seconds — each column header becomes a key in every object. The parser correctly handles RFC 4180 edge cases: quoted fields that contain commas, fields with embedded newlines, and escaped double-quotes within quoted fields. Going the other direction, provide a JSON array of flat objects and get properly formatted CSV with a header row derived from the object keys. The tool is designed to be practical for real-world data: it trims whitespace from headers and values, handles Windows-style CRLF line endings, and produces well-indented JSON for readability. Downloaded files use the correct MIME type — application/json or text/csv — for seamless import into other tools. Everything runs in your browser; no data is uploaded, which matters for files containing personal information, financial records, or other sensitive data.

Làm sao để CSV / JSON Converter?

  1. Select your conversion direction: "CSV to JSON" or "JSON to CSV" using the toggle at the top.
  2. For CSV to JSON: paste CSV text with the first row as column headers. Each subsequent row becomes a JSON object.
  3. For JSON to CSV: paste a JSON array of objects. The keys of the first object become the CSV column headers.
  4. The converted result updates in the right panel automatically as you type.
  5. If there is an error (e.g., no header row found, or invalid JSON), a red error message appears below the panels.
  6. Click "Copy" to copy the result, or click "Download" to save it as a .json or .csv file.

Câu hỏi thường gặp

Does the CSV parser handle quoted fields with commas?

Yes. Fields that contain commas, double-quotes, or newlines should be wrapped in double-quotes per the RFC 4180 CSV standard. The parser correctly handles these cases, including escaped double-quotes written as two consecutive double-quote characters ("").

What happens if my CSV rows have a different number of columns than the header?

If a row has fewer columns than the header, the missing fields will be empty strings in the JSON output. Extra columns beyond the header length are ignored.

Can I convert JSON to CSV if my objects have nested properties?

The JSON to CSV converter works with flat objects (one level of key-value pairs). Nested objects or arrays in a property value will be stringified as JSON text in the CSV cell. For deeply nested data, consider flattening the JSON first.

How do I convert a spreadsheet export to JSON?

In Excel or Google Sheets, use "Save As" or "Download as" and choose CSV format. Then paste the CSV content into this tool and select "CSV to JSON". The first row of your spreadsheet becomes the JSON object keys.

Does this handle different delimiters like semicolons or tabs?

Currently the tool uses the standard comma delimiter. If your CSV uses semicolons or tabs, you may need to replace the delimiter first (using a text editor's find-and-replace) before pasting it here.

Is there a row limit?

There is no hard row limit — the tool runs entirely in your browser. In practice, files with tens of thousands of rows convert quickly. Very large files (millions of rows) may be slow depending on your device.

Công cụ liên quan

JSON FormatterJSON to TypeScriptYAML ↔ JSON ConverterTOML ↔ JSON ConverterXML Formatter
Free Ebook
Top 10 Free Tools Every Developer Needs

Top 10 Free Tools Every Developer Needs

Boost your productivity instantly. Get our exclusive cheatsheet featuring the most essential web utilities you didn't know you needed, delivered straight to your inbox.

We respect your inbox. Unsubscribe at any time.