Initializing, please wait a moment

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.

Input: bytes
Output: bytes

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 uses

Prepare a CSV export for an API or script that expects JSON, or turn a JSON array of records into a CSV file for a spreadsheet.

What to expect

  • The output updates live as you type, not only when you click the button.
  • Blank lines in a pasted CSV are skipped rather than turned into empty rows.
  • A malformed CSV row surfaces an inline error naming the exact row, never a blank output.
  • A single JSON object that is not wrapped in brackets still converts cleanly, with a header line.
  • Copy the formatted result to your clipboard with one click.

Privacy

Your pasted CSV and the JSON it becomes are parsed by page JavaScript inside this browser tab - the rows never travel to a server, and nothing you type or copy is kept once the page closes.

← Back to Developer Tools

Related tools:

  • MD5 converter - Text to MD5 + MD5 to text cached lookup.
  • Convert PDF to TEXT online - Extract text from PDF online for copying and editing.
  • Text To HTML Editor - Text to HTML editor online - write in a WYSIWYG view and watch the generated HTML update live, with
  • CSS Gradient Animator Generator - CSS gradient generator - build animated linear gradients with live preview; copy ready-to-paste CSS
  • CSS Minifier - Minify CSS online for faster page loads.
  • CSS UnMinifier - CSS unminifier online - beautify minified CSS with proper indentation, line breaks, and readable
  • JavaScript Minifier - JavaScript minifier online free - paste your JS, click Minify, and copy the compressed code.
  • JSON Parser By Tree View - Paste JSON to validate, format, and view it in a tree.
  • JavaScript UnMinifier - JavaScript unminifier online - reformat minified JS with indentation and line breaks for
  • Keyboard Test - Press each key - the on-screen layout highlights it.
  • Text Diff - Compare code, text, or HTML online, side by side.
  • Developer Tools - Developer tools to parse JSON, minify or unminify CSS/JS, compare text, and generate MD5 hashes.

Tags: #developer

Related guides:

Related news:

Loading reviews...

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.

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.