PasteSheet icon PasteSheet logo mark — a spreadsheet grid with a curly brace on a green rounded square PasteSheet

Convert CSV to JSON

Paste CSV, get JSON. The first row is read as field names and every row below it becomes an object. Quoted fields, commas inside values and newlines inside cells are all parsed properly.

Your CSV

Nothing is stored.

Key facts

  • There is no formal CSV standard. RFC 4180 documents the format as it is commonly used and registers the text/csv MIME type, which is why exports from different tools disagree in the details. source
  • RFC 4180 defines the escaping rules this converter follows: a field may be wrapped in double quotes, and inside such a field a literal quote is written as two double quotes, while commas and line breaks are taken as data. source
  • JSON exchanged between systems must be encoded as UTF-8 under RFC 8259, so the output is UTF-8 regardless of the encoding your CSV arrived in. source
  • Values are emitted as strings, never coerced — CSV carries no type information, and inferring types is what turns 00734 into 734 and 1.10 into 1.1.

How it parses your CSV

It follows RFC 4180, the convention Excel and Google Sheets both write. A field wrapped in double quotes may contain commas, newlines and doubled quotes, and all three survive the round trip — which is where naive split-on-comma converters fall over.

The first row is the header. Rows with fewer fields than the header are padded, rows with more are trimmed, and columns with a blank header name are dropped rather than producing an empty key.

What the output looks like

output.json
[
  {
    "name": "Ada Lovelace",
    "role": "Engineer, Analytical"
  },
  {
    "name": "Grace Hopper",
    "role": "Admiral"
  }
]

Why CSV conversion goes wrong so often

CSV looks trivial and is not. These are the cases that break hand-rolled converters:

  • Commas inside values. "Engineer, Analytical" is one field, not two. Splitting on commas turns every row after it into nonsense.
  • Newlines inside a quoted field. A multi-line address is still one cell, so counting lines to count rows gives the wrong answer.
  • Doubled quotes as escapes. Inside a quoted field, "" means one literal quote character — not the end of the field.
  • Ragged rows. Real exports have rows shorter or longer than the header. Something has to decide what happens, and silence is the wrong answer.
  • A byte-order mark. Excel prepends one on UTF-8 export, which turns your first column name into an invisible-prefixed key that never matches.
  • Inconsistent line endings. RFC 4180 specifies CRLF, but plenty of tools emit LF, and mixed files exist in the wild.

What happens to types

Values come back as strings, and that is deliberate. CSV carries no type information, so any converter that guesses is choosing on your behalf — and the guesses are where data gets destroyed. A leading-zero product code like 00734 becomes 734, a version string like 1.10 becomes 1.1, and a long identifier silently loses precision as a float.

Keeping everything as a string means the conversion is lossless and you cast deliberately on the other side. If you want types inferred properly from the source instead, read the sheet directly — column types are inferred once, at the sheet, rather than re-guessed on every export.

If the CSV came from a Google Sheet

Skip the export step. Paste the sheet URL directly and get the JSON without downloading a file first — and if you need the data to stay current rather than being a one-time paste, give the sheet a live endpoint.

Frequently asked questions

Does it handle commas inside quoted fields?

Yes. A field wrapped in double quotes may contain commas, newlines and doubled double-quotes, all of which are parsed correctly per RFC 4180. This is exactly what a naive split-on-comma converter gets wrong, and it is the most common reason a CSV import produces garbage.

Is my data uploaded anywhere?

It is sent to the server to be parsed and converted, then returned to you. Nothing is stored, written to a database, logged or shared. If the data is sensitive enough that even that is a concern, do not paste it into any online converter, including this one.

What happens to rows with the wrong number of columns?

Short rows are padded with empty values and long rows are trimmed to the header width, so the output stays rectangular. Columns whose header cell is blank are dropped entirely rather than producing an empty key in every object.

Are numbers converted to JSON numbers?

No — values come back as strings. CSV carries no type information, and guessing destroys data: leading-zero codes lose their zeros, version strings like 1.10 become 1.1, and long identifiers lose precision as floats. Cast deliberately on your side instead.

Why is there a strange character in my first column name?

Excel writes a UTF-8 byte-order mark at the start of the file, which attaches an invisible prefix to your first header. It is stripped here, but it is the usual reason a key that looks correct never matches.

Is there a size limit?

The tool is built for pasted snippets rather than large exports. For a big or frequently changing dataset, point an endpoint at the source sheet and query it instead of re-pasting.

Can I get nested JSON instead of a flat array?

Not from CSV. The format is inherently rectangular — one row, one flat object — so nesting has to be derived afterwards from a column naming convention you choose.

Sources

Related tools

Turn your sheet into an API in minutes

Paste a Google Sheet URL and get a live REST API and MCP server — no backend, no code, free to start.