Processed in your browser

JSON / CSV Converter

JSON input must be an array of objects. Nested objects use dot-separated headers, arrays remain JSON text, and CSV values return as strings. Choose raw or spreadsheet-safe output before downloading UTF-8 CSV.

Processed in your browser
0 / 1,000,000
Converted output

Tool guide

What is JSON / CSV Converter?

JSON and CSV Converter works with tabular arrays of objects and makes nested-field and spreadsheet-formula rules explicit. Nested objects use dotted headers and arrays remain JSON text. When CSV is converted back to JSON, cells stay strings so the tool does not guess dates, numbers, or booleans. Common workflows include the following. Export an API object array for spreadsheet review. Convert a header-based CSV file into frontend-ready JSON. Create a spreadsheet download with reduced formula-injection risk. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.

When to use it

  • Export an API object array for spreadsheet review.
  • Convert a header-based CSV file into frontend-ready JSON.
  • Create a spreadsheet download with reduced formula-injection risk.

How to use it

  1. Paste an object array or CSV with a header row.
  2. Choose delimiter and spreadsheet-safety policy.
  3. Convert, review, copy, or download the result.
  4. Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
  5. Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.

Runnable examples

The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.

Example 1

[{"name":"Ada","role":"admin","profile":{"city":"Shanghai","active":true},"tags":["json","review"]},{"name":"Lin","role":"editor","profile":{"city":"Chengdu","active":false},"tags":["text"]}]

Example 2

name,role,note
Ada,admin,"Review JSON, YAML, and CSV"
Lin,editor,"This quoted cell contains
a line break"

Input rules

  • JSON input must be a non-empty array of objects.
  • The first CSV row must contain headers and quoting must match the delimiter.
  • Choose whether spreadsheet-safe mode is required before download.
  • Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
  • Arrays are preserved as JSON text inside a CSV cell.

Output rules

  • Nested objects use dotted paths as headers.
  • Arrays are stored as JSON text within a CSV cell.
  • CSV cells stay strings when converted to JSON.
  • Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
  • CSV-to-JSON values remain strings and dot-separated headers create nested objects.

Limitations and cautions

  • Arrays are preserved as JSON text inside a CSV cell.
  • CSV-to-JSON values remain strings and dot-separated headers create nested objects.
  • Spreadsheet-safe output changes risky leading characters by adding a visible apostrophe.

How your data is handled

Parsing, conversion, and file creation occur locally. Downloads are created by the current page without uploading data.

FAQ

What JSON shapes are accepted?

Only a non-empty array of objects. Nested objects are flattened with dot-separated headers.

What is spreadsheet-safe mode?

Cells beginning with =, +, -, or @ get a leading apostrophe to reduce formula-injection risk.

Are JSON types restored from CSV?

No. CSV has no reliable type metadata, so all imported values remain strings.

Why are CSV numbers still strings in JSON?

CSV carries no reliable field types. Keeping strings protects leading-zero codes, long identifiers, and ambiguous dates.

How are nested objects exported?

Object fields are flattened into dotted headers, while arrays remain JSON text and should be reviewed for the destination system.

What does spreadsheet-safe mode do?

It prefixes cells that Excel or Sheets might interpret as formulas, reducing formula-injection risk when the file is opened.

Updated: 2026-07-31