Paste CSV or JSON text below and click Convert - the tool detects which one you pasted and gives you the other.
Everything runs in this browser tab, so nothing is uploaded to a server. CSV parsing treats the first row as column headers and automatically detects numbers and booleans, and the Copy Output button copies the finished result straight to the clipboard while Clear resets the input for another run.
CSV to JSON Converter
Paste CSV text on the left and click the button to get pretty-printed JSON on the right - the tool detects the format automatically, so pasting JSON back in converts it to CSV just as easily.
Typical use: preparing a CSV export for an API or script that expects JSON, or turning a JSON array of records into a CSV file for a spreadsheet.
Everything runs locally in this browser tab; your data is never uploaded to a server.
How is the JSON output formatted?
When the CSV to JSON Converter builds JSON from your pasted CSV, it pretty-prints the result with two-space indentation instead of squeezing everything onto one line. Each row becomes its own object across several lines, with the column headers as the object keys, so a CSV export with a dozen rows turns into JSON you can read and scan directly in the output box - and paste straight into a script, a config file, or another tool without reformatting it first.
What if the browser blocks clipboard access?
Clicking Copy Output on the CSV to JSON Converter normally uses the browser's Clipboard API to copy the result in a single step. Most current desktop browsers support that API by default, but some restrict it on pages that are not loaded securely or inside certain in-app browsers - and in those cases the button falls back automatically: it selects the text inside the output box and runs the older execCommand copy method instead. Either path ends the same way, with the converted text on your clipboard and ready to paste into a script, a spreadsheet import, or an API request body, so you never have to select and copy the output text by hand.
Frequently Asked Questions
What does this tool do?
Paste CSV text and it converts to pretty-printed JSON, or paste JSON and it converts back to CSV - the tool detects which format you pasted and produces the other one, all in the browser.
Does it work in both directions?
Yes. The same input box accepts either CSV or JSON. Format detection is automatic, so there is no separate reverse-direction page.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser tab; nothing is sent to a server.
Do I need to click a button, or does it convert as I type?
Either works. The CSV to JSON Converter updates the output box on every keystroke in the input box, not only when you click the button - so if you paste text and then edit it, the output refreshes immediately without another click.
Can I paste a single JSON object, or does it need to be inside an array?
Either works. A single JSON object converts to a one-row CSV with a header line followed by that row's values, the same way an array containing one object would - you do not need to wrap a lone record in square brackets first.
What happens if my CSV has a mistake, like an extra column or a blank line?
A blank line between rows is skipped automatically rather than becoming an empty entry in the output. A row that genuinely does not match, such as one with an extra comma-separated value, produces an inline error naming the exact row number instead of a blank output, so you can go straight to that row and fix it. That row number counts from the first data row after the header line, starting at 0, not from the line number in your original file, so "row 0" means the first data row you pasted, right after the header.
How does the converter know whether I pasted CSV or JSON?
It reads the pasted text itself rather than a dropdown or file extension. Text starting with a curly brace or a square bracket is read as JSON right away; otherwise, if the first line contains a comma, that line is treated as the CSV column headers and the rest as data rows. For example, a first line reading "name,age" is read as CSV column headers, while text starting with a curly brace or bracket skips straight to the JSON path. There is nothing to select - paste either format and the tool figures out the direction on its own.