Free CSV to JSON Converter

Convert CSV or TSV into a clean JSON array of objects, or turn a JSON array back into CSV. Pick your delimiter, choose whether the first row is a header, and download the result.

βœ“ Parsed 2 rows Γ— 3 columns.

JSON output

Quick answer

To convert CSV to JSON, paste your CSV and the tool uses the first row as the object keys, producing a JSON array where each later row becomes one object. A built-in RFC 4180 parser handles quoted fields with commas and "" escaped quotes, so values are split correctly. It also converts a JSON array of objects back into CSV, and everything runs locally in your browser.

Formula & method

Paste CSV (or TSV) and the converter reads it row by row with a small RFC 4180 parser. A double quote starts a quoted field, two double quotes ("") inside a quoted field mean a literal quote, and the chosen delimiter or a newline inside quotes is treated as part of the value rather than a separator. When "First row is a header" is on, that first row supplies the object keys and every following row becomes one JSON object; with it off you get a JSON array of arrays. Optional type coercion turns cells that exactly match a number, true, false, or null into the matching JSON type β€” otherwise every value stays a string. The JSON to CSV direction reverses this: it collects the union of object keys (in first-seen order) for the header, then writes one row per object, automatically quoting any value that contains the delimiter, a quote, or a newline. All parsing happens in your browser; nothing is uploaded.

Examples

Example 1: Basic CSV to JSON (values as strings)
Input
a,b 1,2 (header on, type coercion off)
Result
[ { "a": "1", "b": "2" } ]
Why
The first row a,b becomes the keys. With coercion off, the cell values stay strings, so 1 and 2 are kept as "1" and "2".
Example 2: Quoted field with a comma
Input
name,city "Smith, John",NYC
Result
[ { "name": "Smith, John", "city": "NYC" } ]
Why
Because "Smith, John" is wrapped in quotes, the comma inside it is part of the value and does not start a new column.
Example 3: Escaped quotes inside a value
Input
quote "She said ""hi"""
Result
[ { "quote": "She said \"hi\"" } ]
Why
Two double quotes ("") inside a quoted field decode to one literal quote, so the value becomes She said "hi".
Example 4: JSON array back to CSV
Input
[{"a":1,"b":2},{"a":3,"b":4}] (JSON β†’ CSV, header on)
Result
a,b 1,2 3,4
Why
The keys a and b form the header row, then each object becomes one CSV line. Switch the tab to JSON β†’ CSV to run this direction.

When to use this tool

  • Importing a spreadsheet export (CSV/TSV) into a JavaScript app, API payload, or config file as JSON.
  • Inspecting messy CSV with quoted commas or embedded quotes and seeing exactly how each field is parsed.
  • Generating a CSV download from JSON API data for use in Excel, Google Sheets, or a BI tool.
  • Quickly reshaping small datasets during development without writing a one-off parsing script.

Common mistakes

  • Forgetting to turn type coercion on or off. With coercion off, 1 stays "1" (a string); with it on, it becomes the number 1. Pick the setting that matches what your downstream code expects.
  • Using the wrong delimiter. Tab-separated (TSV) and semicolon files will parse as one big column if the delimiter is left on comma β€” select the matching delimiter first.
  • Expecting JSON to CSV to accept a single object. The JSON to CSV direction needs a top-level array, like [{...},{...}], not a bare object {...}.
  • Leaving 'First row is a header' on for headerless data, which silently turns your real first data row into the keys.

Frequently asked questions

Does the first row become the JSON keys?

Yes, when 'First row is a header' is enabled the first CSV row supplies the keys for every object. Turn it off to get a plain JSON array of arrays where no row is treated as keys.

Can it handle commas and quotes inside a field?

Yes. The parser follows the RFC 4180 convention: wrap a value in double quotes to include the delimiter or a newline, and use two double quotes ("") to represent a literal quote inside that value.

How do I convert TSV (tab-separated) files?

Choose 'Tab ( TSV )' from the Delimiter menu. The same parser then splits on tabs instead of commas, and everything else works identically.

Are numbers kept as text or converted to real numbers?

That is your choice. With 'Convert numbers / true / false / null' enabled, cells that exactly match a number or a JSON literal become real JSON types; with it disabled, every value stays a string.

Can I convert JSON back into CSV?

Yes. Switch to the JSON β†’ CSV tab and paste a JSON array of objects. The tool builds a header from the union of all keys and quotes any value that contains the delimiter, a quote, or a newline.

Is my data uploaded to a server?

No. All parsing and conversion run entirely in your browser using JavaScript, so your CSV and JSON never leave your device.

Sources & references

External references open in a new tab. We are independent and not affiliated with these organizations.

  • βœ“ Free to use
  • βœ“ No sign-up required
  • βœ“ Runs entirely in your browser β€” nothing is uploaded.
  • βœ“ Formula and method shown above

Provided β€œas is” for general information only β€” results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the csv to json converter to appear: