Swap the rows and columns of CSV, TSV or cells pasted from a spreadsheet: the first column becomes the header row and every row becomes a column. Quoted fields, commas and line breaks inside cells are handled correctly.
Last updated:
Preview of the transposed table
Your data is processed locally in this tab and never uploaded. Tip: copy the result with Tab output and paste it straight into Excel or Google Sheets.
Advertisement
Advertisement
How to use the CSV Transpose
Paste your data into the left box, open a .csv, .tsv or .txt file, or copy cells from a spreadsheet and paste them. A sample is loaded so you can see the result.
Check the delimiter: Auto-detect works for most files; pick comma, semicolon, tab, pipe or a custom character if needed.
Choose the output format: keep the same delimiter or switch, for example to Tab for pasting into Excel.
Press Transpose CSV (it also updates live) and check the row and column counts and the preview table.
Copy or download the transposed file, or press Swap to use it as the new input.
What transposing looks like
The first column of the original becomes the header row of the result, and the original header row becomes the first column. Cell (row r, column c) moves to (row c, column r).
Original CSV (3 rows × 3 columns)
Transposed (3 rows × 3 columns, flipped)
Name,Q1,Q2
North,120,135
South,98,104
Name,North,South
Q1,120,98
Q2,135,104
A table with m rows and n columns always becomes n rows and m columns, and transposing twice gives back the original exactly.
When to transpose CSV data
Wide to long for charts: many charting tools expect one series per column. If your months run across the top, transposing puts them down the side.
Database and API imports: exports that list fields down the first column (a "key, value" layout per record) need to be flipped so each field becomes a column header.
Readable comparisons: a table with 3 products and 40 attributes is easier to read with the products as columns.
Survey and sensor data: instruments often write one row per measurement type; analysis tools usually want one row per sample.
Delimiters and quoting
Format
Delimiter
Where you see it
CSV
Comma ,
Default in the US/UK, most apps and databases
CSV (European)
Semicolon ;
Excel in locales that use a decimal comma (Germany, France, Spain…)
TSV
Tab
Cells copied from Excel, Google Sheets or Numbers, many data exports
PSV
Pipe |
Log files, legacy and mainframe exports
Under RFC 4180, a field that contains the delimiter, a double quote or a line break is wrapped in double quotes, and quotes inside it are doubled: "Spring ""launch"" promo". With Quote output fields: Only when needed the tool follows exactly this rule; choose Always if a strict importer expects every field quoted.
Frequently asked questions
What does transposing a CSV do?
Transposing flips the table along its diagonal: row 1 becomes column 1, row 2 becomes column 2, and so on. A file with 5 rows and 3 columns becomes 3 rows and 5 columns, and the cell at row r, column c moves to row c, column r. It is the same operation as Paste Special › Transpose in Excel or the TRANSPOSE function.
Does it handle commas and line breaks inside cells?
Yes. Fields wrapped in double quotes may contain the delimiter, line breaks and quotes written as two double quotes (""), as defined in RFC 4180. They are parsed as single cells and quoted again in the output where needed, so the structure is preserved.
How is the delimiter detected?
The tool tries comma, tab, semicolon and pipe on the first rows and picks the one that splits the most rows into the same number of columns. Data copied from Excel or Google Sheets is tab-separated, and many European CSV exports use semicolons. You can always override the choice.
What happens if rows have different lengths?
The table is first squared up: short rows are padded with empty cells to the length of the longest row, so every value keeps its position. The message tells you how many rows were padded.
How do I transpose in Excel or Google Sheets instead?
In Excel, copy the range, right-click the target cell and choose Paste Special › Transpose, or use =TRANSPOSE(A1:E10). In Google Sheets use =TRANSPOSE(A1:E10). This tool is quicker for CSV files you do not want to open in a spreadsheet, and it never changes values such as leading zeros or long numbers.
Will my numbers or dates be changed?
No. Every cell is treated as text and moved exactly as written, so leading zeros, long IDs, dates and formulas are not reformatted the way a spreadsheet might.
Is my data uploaded?
No. Parsing and transposing run in JavaScript in this page, so your file never leaves your device.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.