CSV to JSON Converter
Convert CSV data into structured JSON quickly.
Open CSV to JSON Converter
Convert CSV to TSV or TSV to CSV with correct quoting for commas, tabs, quotes and line breaks.
This converter changes comma-separated values into tab-separated values and back again. Pick a direction with the CSV to TSV and TSV to CSV tabs, paste your data, and the converted table appears as you type. It is handy when a spreadsheet gives you tab-separated text but an importer wants CSV, or when CSV full of commas is easier to read and paste as TSV.
Instead of swapping delimiters with find and replace, the tool parses each row properly. Quoted cells that contain commas, tabs, double quotes or line breaks stay in one cell, and the output adds quotes only where the target format needs them. Conversion runs in your browser.
CSV to TSV or TSV to CSV at the top of the tool.Input CSV or Input TSV box. The output updates automatically after a short pause.Trim values to remove spaces around each cell, or Skip empty lines to drop blank rows. Reset to defaults turns both off again.Output TSV or Output CSV panel and the Rows badge. If the input has a quoting problem, the error appears in the output and the affected input line is highlighted.Copy output, or use Swap input and output to move the result into the input and flip the direction.In CSV to TSV mode, Wilmslow, UK no longer needs quotes because commas are not special in TSV. The cell with doubled quotes and the cell with a line break are still quoted, with inner quotes doubled, so they stay one cell each.
name,city,notes
Ada,London,"Loves ""math"", tea"
Alan,"Wilmslow, UK","Line one
Line two"name city notes
Ada London "Loves ""math"", tea"
Alan Wilmslow, UK "Line one
Line two"In TSV to CSV mode, the description Small, blue contains a comma, so it is wrapped in quotes in the CSV output. Cells without commas, quotes or line breaks are written as they are.
product price description
Widget 9.99 Small, blue
Gadget 12.50 Pack of 3product,price,description
Widget,9.99,"Small, blue"
Gadget,12.50,Pack of 3With Trim values and Skip empty lines both on, the spaces around each cell are removed (including the trailing space inside the quoted "Alan ") and the blank second line is dropped. The Rows badge shows 3.
id, name , score
1, Ada , 98
2,"Alan ", 91id name score
1 Ada 98
2 Alan 91Both directions read the input with RFC 4180 rules: a cell that starts with a double quote can contain the delimiter, line breaks and quotes written as "", and it ends at the next double quote that is not doubled. The double quote is the quote character for TSV input as well as CSV.
When writing the output, a cell is wrapped in double quotes only if it contains the output delimiter, a double quote or a line break. Any double quotes inside the cell are doubled. Everything else is written without quotes, so the output stays as close to the input as possible.
\n) in the output, whether the input used Windows CRLF or Unix LF line endings.Both switches are off by default, so the converter keeps your data byte for byte apart from the delimiter and the necessary quoting. With them off, a blank line in the input becomes a blank line in the output, and spaces after commas stay part of the cell.
Trim values removes leading and trailing whitespace from every cell after parsing, including quoted cells. Skip empty lines removes rows where every cell is empty, which also drops a trailing blank line at the end of a pasted file. Turn them on when cleaning up exports before importing them elsewhere, and leave them off when spaces are meaningful.
If a quoted cell is never closed, the output shows Unclosed double quote. If text follows a closing quote in the same cell, as in "abc"x, it shows Stray double quote in quoted field (use "" for a literal quote). In both cases the line is highlighted in the input so you can fix it. The same messages appear in TSV to CSV mode.
A double quote only starts a quoted cell when it is the first character of the cell. Anywhere else it is kept as literal text, so unquoted TSV copied from a spreadsheet, such as 27" monitor, converts as-is. When the output is CSV, that cell is quoted and the inner quote doubled: "27"" monitor".
Rows are not padded or truncated. A row with fewer cells than the header is converted with the cells it has, so check the Rows count and the output when the source file is irregular.
Your data is parsed and converted in the browser and never uploaded. The current input, direction and switch settings are saved in this browser's local storage so they survive a page reload. Click Clear input to remove the saved data.
More utilities that pair well with this one.
Convert CSV data into structured JSON quickly.
Open CSV to JSON Converter
Convert JSON arrays of objects (or a single object) into CSV.
Open JSON to CSV Converter
Strip repeated lines from multiline text while keeping first-seen order.
Open Remove Duplicate Lines
Common questions about this tool.
CSV to TSV or TSV to CSV tab above the editors. The output updates automatically. Swap input and output moves the converted result into the input box and flips the direction, which is a quick way to check a round trip."" quotes. Each cell is read as one value and written back out as one cell in the target format.Wilmslow, UK stays unquoted in TSV but becomes "Wilmslow, UK" in CSV.Trim values removes leading and trailing spaces from every cell, including inside quoted cells. Skip empty lines drops rows where every cell is empty. Both are off by default, so the output keeps your data exactly as it was; Reset to defaults turns them off again.Unclosed double quote.) or when text follows a closing quote (Stray double quote in quoted field). The line with the problem is highlighted in the input. Make sure each quoted cell ends with a quote and that quotes inside it are written as "".Rows badge shows how many rows were written, which helps you spot unexpected blank lines.\n) between rows, which every modern spreadsheet and parser accepts.Clear input removes the saved text.