CSV / JSON Converter

Convert CSV or TSV to JSON and JSON to CSV in your browser, with a table preview. Handles quoted fields, detects the delimiter and reads Shift_JIS files. Infers numbers, booleans and null, flattens nested JSON into dot-notation columns, and can save CSV with a BOM for Excel.

About this tool

What does this converter do?

CSV is the usual export format of spreadsheets and databases, while JSON is what most APIs and programs expect. This tool converts in both directions as you type and shows the data as a table, so you can check columns and spot broken rows before using the result. Files are read in your browser and never uploaded.

How to use

  1. Choose CSV → JSON or JSON → CSV at the top.
  2. Paste data into the CSV / JSON box, or drop a .csv, .tsv, .txt or .json file onto the drop area (or click it to select one). The mode switches automatically based on the file.
  3. Adjust the options below the input. The result updates immediately.
  4. Open the JSON / CSV tab to see the output and use Copy or Download, or open the Table tab to inspect the rows.

CSV to JSON options

OptionWhat it does
DelimiterAuto (detected from the first rows), Comma, Tab, Semicolon or Pipe
OutputArray of objects (one object per row) or Array of arrays
Indent2 spaces, 4 spaces, Tab or Minified
First row is headerUse the first row as keys. Empty or duplicate names become column3, name_2 and so on
Infer types (number, boolean, null)Turn 42, true/false and empty or null cells into JSON values. Values with leading zeros such as 007 and integers too large to keep exactly stay strings

JSON to CSV options

OptionWhat it does
Nested valuesFlatten (a.b.c) creates columns like address.city and tags.0; JSON string writes nested objects and arrays as JSON text in one cell
DelimiterComma, Tab, Semicolon or Pipe (Tab downloads as .tsv)
Line endingCRLF (Windows / RFC 4180) or LF
Download encodingUTF-8, or UTF-8 with BOM (Excel) so Excel shows non-English text correctly
Header rowInclude or omit the column names

The input can be an array of objects, an array of arrays, or a single object. Columns are the union of all keys in the order they first appear, so objects with missing keys simply get empty cells.

Features

  • RFC 4180 parsing: quoted fields, "" escapes, and commas or line breaks inside quotes
  • Problem reports with line numbers: unclosed quotes, stray quotes and rows with a different number of fields
  • Invalid JSON is shown with its line, column and a pointer to the position (when the browser reports it)
  • Encoding detection for dropped files: UTF-8, UTF-16, Shift_JIS, EUC-JP and JIS
  • Table preview with row and column counts; the first 100 rows are shown and more can be loaded on demand
  • Large data is converted in full; the output box shows the first 300,000 characters, and Copy / Download always include everything

Example

CSV input:

JSON output (array of objects, types inferred):

FAQ

Are my files uploaded?

No. Reading, decoding and converting all happen in your browser.

Why are Japanese characters garbled when I open the CSV in Excel?

Excel assumes a legacy encoding for CSV files without a BOM. Set Download encoding to UTF-8 with BOM (Excel) before downloading.

Why does a zip code like 01234 stay a string?

Type inference never converts values with leading zeros, so codes and IDs are not changed. Turn off Infer types if you want every value as a string.

Can I convert a semicolon-separated CSV from European Excel?

Yes. Auto usually detects the semicolon; you can also select Semicolon (;) under Delimiter.