How to use the csv transpose tool
- Paste your CSV data into the first box.
- Leave the separator on Detect it, or choose it if the first line is unusual. Tick the quote option if you want every field quoted.
- Read the flipped table in the result box: the first row becomes the first column, the second row the second column, and so on.
- Use Copy transposed CSV or Download file to keep it, or Use result as input to flip it back.
What transposing does
Transposing swaps rows and columns. A table with 3 rows and 4 columns becomes one with 4 rows and 3 columns. In the example, the header row Month, Jan, Feb, Mar becomes the first column, and each month becomes a row with its sales and costs. It is the same operation as Paste Special, Transpose in a spreadsheet.
Doing it twice gives back the original, provided every row had the same number of fields. The Use result as input button makes that easy to check.
Uneven rows and quoted fields
If some rows are shorter than others, the shorter ones are padded with empty fields, so the result is a complete rectangle and the page tells you. Padding means a transposed copy of uneven data does not flip back to exactly the original, because the added empty fields remain.
Fields in quotes, with commas or line breaks inside, are kept in one piece and quoted again on output where needed. The separator you read is the one used to write.
When you would use it
Wide exports with one column per date or product are often easier to read or chart when flipped to one row each. Going the other way helps when a survey or a form gives answers in rows and your analysis tool wants columns. After flipping, use the CSV sorter, the CSV statistics viewer or the Markdown table generator.
Everything runs in your browser and nothing is uploaded. The input limit is 2,000,000 characters.
Assumptions and limits
- The first non-empty line decides the separator when it is on detection, and the same separator is used for the output.
- Short rows are padded with empty fields on the right before flipping.
- Completely empty lines are dropped before the table is flipped.
- Nothing is uploaded or stored, and the input is limited to 2,000,000 characters.
Frequently asked questions
How do I transpose a CSV?
Paste it into the box above. The result shows the rows as columns and the columns as rows, ready to copy or download.
What happens if my rows have different lengths?
Shorter rows are padded with empty fields so the flipped table is a full rectangle. The page notes when this happened.
Can I flip it back?
Yes. Use the result as the input and transpose again. For rows of equal length you get your original table back exactly.
Is this the same as Paste Special Transpose in a spreadsheet?
It does the same job on plain CSV text, without opening a spreadsheet and without changing any values.