CSV ↔ JSON
Utility ToolboxCheck your network

CSV ↔ JSON converter

Convert tables and object arrays while preserving text

Everything is processed in this browser. Your content is never uploaded, saved or added to the URL.

CSV export prefixes formula-like cells with an apostrophe, including negative numbers and headers. This changes the text; turn it off to export original values.

Paste content and choose a conversion direction.

Maximum input 1 MiB · Up to 10,000 data records (excluding the header) · Up to 100,000 cells · Maximum output 4 MiB

Conversion rules

The first CSV row contains field names. Names must be nonempty and unique; every row must have the same column count. Quotes, escaped quotes and multiline cells are supported. Values become strings, preserving leading zeroes.

JSON must be an array of objects. Columns follow the order fields first appear. Only strings, numbers, booleans and null are accepted; missing values and null become blank cells. CSV does not retain JSON types. Use JSON strings for large integers or decimals whose exact precision matters.

Convert CSV and JSON without losing table boundaries

Convert an exported table to JSON or turn an array of objects into CSV for an import, a small data migration, or a field check. Before converting, confirm the header row, delimiter, and destination app’s behavior. Leading zeros, multiline cells, and spreadsheet formulas deserve special attention.

Check the header and delimiter first

For CSV-to-JSON, the first record supplies the field names. The converter supports commas, semicolons, and tabs. Headers must be nonempty and unique, and each data row must have the same number of fields. If several columns appear as one, check whether your spreadsheet exported semicolons.

Quoted commas, doubled quotes, and newlines inside quoted cells are parsed as part of a field. JSON output keeps every CSV cell as a string, so `0012` remains `"0012"` at this stage instead of becoming 12. A later system may still interpret it differently according to its own schema.

CSV input:
id,name,note
0012,Ada,"Hello, world"
0042,Grace,"Line one
Line two"

JSON output:
[
  {
    "id": "0012",
    "name": "Ada",
    "note": "Hello, world"
  },
  {
    "id": "0042",
    "name": "Grace",
    "note": "Line one\nLine two"
  }
]

Keep identifiers as text when exporting JSON

JSON-to-CSV accepts an array of objects. Headers follow the order in which fields first appear across the objects; a missing field becomes an empty cell. Nested objects, arrays, and non-finite numbers produce an error instead of being silently flattened, leaving you to choose how to transform them.

If `id` is an account number, postal code, or product code, store it as a JSON string such as `"0012"`. If it is already the number `12`, the converter cannot infer two missing leading zeros. CSV also has no universal column-type declaration, so spreadsheet software may auto-convert the exported value again.

Formula protection changes exported text

When exporting CSV, formula escaping is on by default. It prefixes a single quote to values that could be treated as spreadsheet formulas: text beginning with optional whitespace followed by `=`, `+`, `-`, or `@`, and values beginning with a tab, carriage return, or newline. The same rule applies to headers, so the cell text changes.

This can reduce risk when opening untrusted CSV files, but it does not replace the receiving spreadsheet’s security settings, and spreadsheet apps do not all interpret the prefix identically. Turn it off only when you need the original text and can inspect or import the file in a trusted environment.

Limits and a useful result check

The limits are 1 MiB of input, 10,000 data rows, 100,000 cells, and 4 MiB of output. Split a larger table before conversion. For a column-count or quoting error, check for a mixed delimiter, a missing closing quote, or a row whose field count differs from the header.

Conversion runs in the current browser and changes structure; it does not validate business meaning, date time zones, currency precision, or database constraints. Sample the first and last records and cells containing commas, quotes, or newlines before importing. The JSON formatter and JSON Lines tool can help inspect the next stage.