Skip to main content

CSV to JSON Converter

Convert CSV files to JSON, NDJSON, or column arrays

Convert a CSV file to JSON in your browser: upload or paste the data and get formatted JSON back immediately. Nothing is uploaded to a server, so you can convert exports that contain customer records, internal IDs, or anything else you would not paste into an unknown website.

Most converters emit one shape — an array of objects — and stop there. This one also writes NDJSON (JSON Lines) for log pipelines and bulk-import endpoints, arrays of arrays when you need the raw grid, and column arrays when a charting or dataframe library wants each field as its own list.

The details that usually break an import are handled explicitly. Type detection is opt-in and conservative, so a ZIP code like 007 or a 20-digit order number stays a string instead of silently becoming a different number. Headers such as user.name or tags[0] can expand into real nested objects and arrays, and if two columns would collide the tool tells you rather than overwriting a value.

Files stay on this deviceRuns entirely in your browserFree — no signup

Drop your file here or browse from your device

Accepts CSV, TSV, TXT. Maximum input: 10 MiB. Files above this hard limit are rejected before local processing.

Continue your workflow

Finished this step? Take the result into a focused tool for what comes next.

How to Convert

  1. Upload your CSV file or paste CSV data into the tool
  2. Open Output Options and pick a JSON structure — array of objects, array of arrays, column arrays, or NDJSON
  3. Optionally enable type detection, nested header expansion, and how empty cells should be written
  4. Review the JSON preview, then copy it or download the .json or .ndjson file

Features

  • Four output shapes: array of objects, array of arrays, column arrays, and NDJSON
  • Optional type detection for numbers, booleans, and null
  • Numeric safety — leading zeros, phone numbers, and IDs beyond double precision stay strings
  • Expand dot and bracket headers (user.name, tags[0]) into nested objects and arrays
  • Choose whether an empty cell becomes "", null, or an omitted key
  • Blank and duplicate headers renamed so no column is silently dropped
  • Pretty-printed or minified output, copy or download
  • Runs entirely in your browser — the file is never uploaded

Use Cases

  • Turn a spreadsheet export into the array of objects a REST API expects
  • Produce NDJSON for bulk indexing, log pipelines, or line-delimited ingestion
  • Build JSON fixtures and seed data for tests from a CSV of sample records
  • Reshape a flat export into nested request bodies using dot-path headers
  • Feed column arrays straight into a charting or dataframe library
  • Convert config or reference tables maintained in a spreadsheet into JSON

Frequently Asked Questions

How do I convert a CSV file to JSON?

Upload the CSV or paste it into the box, choose an output structure, and the JSON preview updates immediately. Copy it or download the file. The conversion runs in your browser, so nothing is sent to a server.

What JSON structures can I output?

Four. Array of objects uses your header row as keys and is what most APIs expect. Array of arrays keeps the raw grid with the header row first. Column arrays give one array per field. NDJSON writes one compact JSON object per line.

What is NDJSON and when should I use it?

NDJSON (also called JSON Lines or JSONL) puts one complete JSON object on each line with no wrapping array. Streaming consumers, bulk-import endpoints, and log tooling prefer it because a reader can process one line at a time without loading the whole document.

Will my ZIP codes and IDs be turned into numbers?

Only if you ask for type detection, and even then the rules are deliberately strict. A value keeps its string form unless it is an exact JSON number that a double can hold without loss, so 007, +15551234, 1.2.3, and a 20-digit order number all stay strings.

Can I create nested JSON from a flat CSV?

Yes. Enable "Expand nested headers" and a column named user.name becomes {"user":{"name":...}}, while tags[0] and tags[1] become an array. If a nested path would overwrite another column the tool keeps that column flat and reports it instead of losing the value.

How are empty cells handled?

You choose. An empty cell can stay an empty string, become null, or have its key left out of the record entirely — which is often what an API validating optional fields expects.

What happens to duplicate or blank column headers?

Both are renamed so every column stays addressable: blanks become column_2 style names by position, and a repeated header gains a numeric suffix. The tool lists what it renamed so the mapping is never a surprise.

Is my data private?

The CSV is parsed and converted in your browser and its contents are not sent to the app server. As with any website, avoid opening highly sensitive files on a device or browser you do not trust.

Need to convert the other way? Try our Json To Csv