# CSV to JSON Converter Online - Convert JSON to CSV Both Ways

> Free online CSV ⇄ JSON converter: handles quotes, commas and newlines inside fields, auto-detects the delimiter, with a header toggle and type conversion.

- URL: https://qilingtools.com/en/csv-json
- Category: Developer Tools (https://qilingtools.com/en/dev)
- Tags: [Converters](https://qilingtools.com/en/tags/convert), [Developer](https://qilingtools.com/en/tags/dev), [Data Formats](https://qilingtools.com/en/tags/data)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Paste a CSV exported from Excel or a TSV dumped from a database and instantly get a structured JSON array, or flatten a JSON array from an API into CSV you can open in Excel. The parser follows RFC 4180: quoted fields may contain commas and newlines, and "" stands for a literal quote, so rows never get split incorrectly. The delimiter can be auto-detected or set to comma, tab, semicolon or pipe; the first row can become JSON keys, and numbers, true/false and null can be converted to real types. Everything runs in your browser, which makes it safe for customer lists, orders and other sensitive data.

## How to use

1. Choose the direction: CSV → JSON or JSON → CSV
2. Paste CSV text or a JSON array; keep the delimiter on Auto-detect or pick one
3. Toggle header row, pretty print and type conversion, then copy the result or download a .json / .csv file

## Features

- Two-way CSV ↔ JSON with one-click direction swap
- Correctly handles quotes, commas and newlines in fields (RFC 4180)
- Auto-detects comma, tab, semicolon and pipe delimiters
- Header row to array of objects, or plain 2D arrays
- Converts numbers, booleans and null to real types
- JSON → CSV unions all keys as columns, nested values become JSON strings
- CSV download includes a BOM so Excel opens UTF-8 correctly
- Converted locally, nothing uploaded

## FAQ

### Will commas or newlines inside a field break the rows?

No. As long as the field is wrapped in double quotes per the CSV standard (Excel does this automatically), commas and newlines inside are kept as content, and two double quotes "" represent one literal quote.

### How are nested objects and arrays handled in JSON → CSV?

All keys that appear in any object become columns (missing values are left empty), and nested objects or arrays are serialized as JSON strings in the cell so no information is lost.

### Non-ASCII text looks garbled when I open the CSV in Excel?

The downloaded CSV includes a UTF-8 BOM so modern Excel detects the encoding. If it still looks wrong, import it via Data → From Text/CSV and choose UTF-8.

### Is my data uploaded?

No. Everything runs locally in your browser with no network upload and is discarded when you close the page, so it is safe for internal or sensitive data.

## Related tools

- [JSON Formatter](https://qilingtools.com/en/json): Free online JSON formatter: beautify or minify, validate with the exact line and column of any error, browse a collapsible tree, sort keys and escape strings.
- [Base64 Encode/Decode](https://qilingtools.com/en/base64): Free online Base64 encoder and decoder: UTF-8 safe, optional URL-safe variant, convert text to Base64 and back in real time. Processed locally, never uploaded.
- [URL Encode/Decode](https://qilingtools.com/en/url-encode): Free online URL encoder and decoder with encodeURIComponent and encodeURI modes. Escapes Chinese, spaces and special characters. Real-time and local, no upload.
- [JWT Decoder](https://qilingtools.com/en/jwt): Free online JWT decoder: decode the header and payload of a JSON Web Token, show expiry and issued-at times, all locally without uploading the token.
- [Timestamp Converter](https://qilingtools.com/en/timestamp): Free online Unix timestamp converter: convert timestamps and dates, auto-detect seconds or milliseconds, and show local, UTC, ISO 8601 and relative time.
- [Hash / Checksum](https://qilingtools.com/en/hash): Free online hash calculator: SHA-1, SHA-256, SHA-384 and SHA-512 of text or any file through the browser crypto API. Files never leave your device.
- [UUID Generator](https://qilingtools.com/en/uuid): Free online UUID generator: create RFC 4122 UUID v4 in bulk with a cryptographic RNG. Options for uppercase, no hyphens and braces, with one-click copy.
- [Base Converter](https://qilingtools.com/en/base-convert): Free online number base converter: convert between binary, octal, decimal, hexadecimal and any base 2–36. Uses BigInt for huge integers, computed locally.
