Written by Jane Smith · Reviewed by Alex Chen · July 17, 2026
Convert CSV to JSON or JSON to CSV instantly. Supports custom delimiters and quoted fields.
Two directions live on one page: CSV to JSON and JSON to CSV. Paste text and the output updates as you type; the mode buttons at the top pick the direction. A delimiter dropdown handles comma-separated files, tabs, semicolons, pipes, or a custom separator of your own, and a swap button reverses input and output for a quick round-trip.
The page treats CSV as a table: the first row becomes the header, and every later row becomes one object. JSON input can be an array of objects or a single object, which gets wrapped in an array automatically. The output pane is a plain text box — copy from it with the copy button or select the text yourself. The stats line below reports how many rows and columns came out.
Sample data sits one click away and fills whichever direction you are in: three people with an email and a role for CSV, the same three as an array for JSON. The box is small on purpose — this is a tool for a paste and a copy, not a place to dump a database export. The Convert button re-runs the conversion by hand, the copy button places the output on your clipboard (with a small toast when there is nothing to copy), and Clear empties both boxes and hides the error line.
CSV to JSON runs a small state machine over the text. It walks character by character, tracking whether it is inside a quoted field; the delimiter ends fields, a newline ends rows, and doubled quotes inside a quoted field become one literal quote. Carriage returns are skipped so files saved on any operating system parse the same way. The first row supplies the keys of every object, and the output is pretty-printed JSON with two-space indentation.
JSON to CSV parses the text with the browser's JSON parser, then walks the array. Keys are collected from every object in the order they first appear, forming the header row. Each object becomes one line, with missing keys rendered as empty cells and null values as empty text. A field that contains the delimiter, a quote, or a line break gets wrapped in double quotes, and embedded quotes double up on the way out.
Nothing you paste leaves this page — parsing and formatting happen entirely in your browser. The stats line under the output counts the rows and columns of the last conversion, so a glance confirms the shape before you copy.
Two rows about two people make a compact demonstration. Take the header name,age,city with the rows Ada,36,London and Grace,46,New York. CSV to JSON produces an array of two objects, and each field keeps its text form — the ages read “36” and “46”, quoted, never numbers. The stats line shows Rows: 2 and Columns: 3.
Reversing that JSON back to CSV returns the same three lines: the header plus Ada and Grace. The city New York contains no comma, so it needs no quotes; a city such as New York, NY would come back wrapped in double quotes because the separator lives inside the field.
The swap button puts the whole loop at one press: it moves the output into the input box, flips the direction, and runs the conversion again. That is the fastest way to confirm a round-trip holds. The same sample appears in the box on first load, so the page demonstrates itself before you touch anything.
No. Every CSV cell becomes a JSON string, so a year, a price, or a count arrives quoted. The reverse strings whatever it meets: numbers and booleans become their text form, null becomes an empty cell.
A single object is accepted and wrapped in an array automatically. A bare value like 42 is rejected with JSON must be an array of objects, as is a string.
Files that separate fields with a semicolon, a pipe, or a tab rather than a comma. Choose Custom from the dropdown and type your separator in the small box, which accepts up to two characters.
A blank line inside the CSV became a row of its own. The parser keeps interior blank lines, so a stray double newline between records appears in the JSON as an object whose fields are all empty strings.
The dropdown does not re-run the conversion on its own. Type one character in the input box and the output refreshes; the custom delimiter box converts as you type instead.
It comes back wrapped in double quotes, and an embedded quote becomes two quotes in a row. The parser reads that same convention on the way in, so the round-trip preserves the field exactly.
It moves the output into the input box, flips the direction buttons, and converts again. Nothing happens if the output is empty. It is the quickest way to check that a conversion survived a trip out and back.
Reach for it when a spreadsheet export needs to become a JSON payload for a script, or when an API response needs to be read as a table. It suits small, well-formed text pasted into the box: a header, a handful of rows, one delimiter, and a shape that the sample data previews in advance.
Leave it on the shelf for large files and complex shapes. A million-row export belongs to a command-line script, not a paste box; nested JSON loses its structure because each value flattens to a string; and rows with wildly different keys produce a ragged, wide table. For one-off, hand-sized conversions, the page is enough.