CSV to JSON converter

Paste CSV or open a file and get a JSON array with one object per row, named by the header row. It runs in your browser, so nothing is uploaded.

Example CSV: paste your own over it, or open a file

JSON

3 rows and 6 columns, separated by commas.

A CSV of websites? The Website Contacts API returns the emails, phones and social profiles each one publishes.

Free, no sign-up. It runs in your browser: what you type is not sent anywhere.

Checked on 2026-11-24.

How to convert CSV to JSON

Paste the CSV into the box, drop a .csv file on it, or open one with the file button. The JSON appears underneath at once: a list with one object per row, its names taken from the header row. The line under it says how many rows and columns were read, which separator was used, and anything that did not fit, such as a row with fewer fields than the header. Copy the JSON, or download it as a .json file.

The menus set how the CSV is read: the separator (found from the first line unless you choose one), whether the first row holds names, whether numbers and true/false become JSON values, and whether dotted names such as price.amount become nested objects. The swap button sends the JSON back the other way.

How the CSV is read

The reader follows RFC 4180: fields separated by commas, an optional header line, and fields that may be enclosed in double quotes. Inside quotes, a comma, a line break or a doubled double quote ("") is part of the field, so in the example "Clip lamp ""Mini""" is read as Clip lamp "Mini" and the note in the second lamp's row keeps its line break.

It also accepts files that stray from the RFC in these ways:

  • Line endings may be CRLF, as the RFC says, or LF or CR alone. A byte-order mark at the start is skipped.
  • The separator may be a semicolon, a tab or a pipe. On automatic, the reader counts each of these and the comma in the first line, outside quotes, and takes the most frequent.
  • Blank lines are skipped. The RFC asks for the same number of fields in every line; a shorter row gets the missing fields as null (or empty text), a longer one gets extra names column7, column8 and so on, and the summary says how many rows were like that.
  • The RFC says that "If fields are not enclosed with double quotes, then double quotes may not appear inside the fields." A quote in such a place is kept as an ordinary character, and counted in the summary.
  • Empty or repeated column names get a name of their own: column3, or name_2.

Numbers, true and false, and empty cells

CSV has no types: every field is text. With Values set to JSON values, the converter writes a field as a JSON number when it is written like one (12, -3.5, 1e6), as true or false when it is that word in any case, and an empty field as null. Two kinds of field stay text on purpose. One with a leading zero, such as the SKU 00731 or a postal code, would lose the zero as a number. One with more than 15 significant digits, such as a long id, would be changed by a JavaScript number; RFC 8259 says only integers in the range [-(2**53)+1, (2**53)-1] are ones implementations "will agree exactly on". A number loses trailing zeros: 24.50 becomes 24.5. Choose Everything as text to keep every field exactly as written.

Nested objects from dotted names

A CSV made from nested JSON often has names like price.amount and price.currency. Choose Make nested objects and they become {"price": {"amount": 24.5, "currency": "EUR"}}; numbered names such as tags.0 and tags.1 become a list. A name that would clash stays as it is: if there is a column price as well as price.amount, price.amount keeps its dot, because price cannot be a value and an object at once. The option is off by default, since ordinary names can contain dots too.

Where it stops

  • A quote that is never closed. The reader stops and says on which line the quoted field starts, rather than guessing where it should end.
  • Character sets. A file is read as UTF-8. One saved in another code page shows wrong letters: save it as UTF-8 and open it again.
  • Formulas. Fields are text; nothing is calculated. A field that a spreadsheet wrote with a leading apostrophe to mark it as text keeps the apostrophe.
  • No header row. Choose Data under First row and each row becomes a plain list of values instead of an object.
  • Size. It opens files up to 25 MB.

Get the data automatically

A common reason to read a CSV in code is a list of things to look up, one per row. With a CSV of company websites, the website contacts endpoint reads each site's home page and the pages most likely to hold contact details, and returns the emails, phone numbers and social profiles the site publishes. Python's csv module reads the file row by row; its documentation asks for the file to be opened with newline='', so that line breaks inside quoted fields are read correctly.

Python
import csv
import os
import requests

with open("websites.csv", newline="", encoding="utf-8") as f:
    for row in csv.DictReader(f):
        res = requests.get(
            "https://pipefetch.com/v1/web/contacts",
            params={"url": row["website"]},
            headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
            timeout=90,
        )
        if res.status_code == 404:
            # no_contacts, website_unreachable or website_blocked: not charged
            print(row["website"], res.json()["error"]["code"])
            continue
        res.raise_for_status()
        emails = [e["email"] for e in res.json()["data"]["emails"]]
        print(row["website"], emails)

Each request costs 1 credit and reads up to 5 pages of the site by default, 10 at most with pages. A website with no email, phone or social profile on the pages read, or one that does not answer, costs nothing.

Questions

How do I convert a CSV file to JSON?

Open the file or paste its contents. Each row becomes a JSON object whose names come from the header row, and the whole file a list of them. Copy the result or download it as a .json file.

Why is 00731 still a string?

Because as a number it would lose its leading zeros. Codes such as SKUs, postal codes and phone numbers are text that happens to be made of digits, so the converter keeps them as text.

My file uses semicolons. Does that work?

Yes. On automatic the converter picks the separator that appears most often in the first line: comma, semicolon, tab or pipe. You can also choose it in the menu.

Why are some values null?

With JSON values turned on, an empty field becomes null, and so does a field missing from a row that is shorter than the header. Choose Everything as text to get empty strings instead.

Can it make nested JSON?

Yes, from dotted column names: choose Make nested objects, and price.amount becomes {"price": {"amount": ...}}, while tags.0 and tags.1 become a list.

Is my CSV file uploaded?

No. The conversion runs in your browser: what you paste, and any file you open, is read by the page itself and is not sent anywhere. The file you download is made on your computer.

Need this for many accounts, or in your code? The Pipefetch API returns the data as JSON, one GET request at a time. Get an API key with 100 free credits, no card needed.

APIs that return this data

Guides

Similar tools

More free tools

All free tools