CSV to JSON

Convert spreadsheet-style CSV into a JSON array.

Also called: CSV to JSON converter, spreadsheet to JSON.

FreeNo sign-upRuns in your browser
DEVELOPER

CSV to JSON

Convert spreadsheet-style CSV into a JSON array.

Runs locally in your browser
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.

Find a tool

Loading tools…

Watch: how to use the CSV to JSON (11 seconds)

Recorded on a phone, steps written on screen, no sound.

About the CSV to JSON

Paste CSV with a header row and get a JSON array of objects, one per row, using the headers as keys. Example: name,age / Ali,30 becomes [{"name":"Ali","age":"30"}].

How the JSON is built

The first row becomes the key names and each further row becomes one object, so name,age followed by Ali,30 gives [{"name": "Ali", "age": "30"}]. An empty header cell is named column1, column2 and so on, by its position.

Every value stays text ("30", not 30), so phone numbers and codes with leading zeros are kept exactly. Values in quotes may contain commas and line breaks. The result is indented with two spaces and is ready for code, APIs or a JSON file.

How to use the CSV to JSON

  1. Enter your textType or paste CSV.
  2. Press Run toolThe result appears right under the button.
  3. Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.

This tool works inside your browser: what you enter stays on your device.

Example

A sample input and the result the CSV to JSON gives for it (produced by the tool itself, not typed by hand).

CSV
name,age Ali,30

Result:

[
  {
    "name": "Ali",
    "age": "30"
  }
]

Good to know

What you need
You type or choose: CSV
Where it runs
In your browser, on your device.
Cost
Free, no sign-up.

Questions

Are numbers kept as numbers?

Values are written as text; convert types in your code if needed.

Can I go back?

Use JSON to CSV.

More tools in Excel & Data

See all Excel & Data tools