Flip rows and columns in a CSV—convert wide to tall or tall to wide
Flip a CSV matrix by turning rows into columns and columns into rows.
Interactive Sample Data
| metric | Q1 | Q2 | Q3 |
|---|---|---|---|
| Revenue | 4500 | 5200 | 4800 |
| Costs | 2100 | 2400 | 2000 |
How this tool works
Things that usually go wrong
- Transposing a file with more columns than rows is fine, but the output may be very wide.
- If the input has no header row, the first row is still treated as a header during transposition.
Edge cases we tested
Output is 5 rows × 3 columns—correctly transposed.
RFC 4180 quoting preserved through the transpose operation.
Transposed correctly; first row used as header unless overridden.
Frequently Asked Questions
When would I need to transpose a CSV?
When metrics are listed as rows and dates as columns (wide format) but your analytics tool expects dates as rows and metrics as columns (tall format).
Does transposing lose any data?
No. The operation is fully reversible — transpose the output again to get back the original.
Related tools
Pivot a CSV
Summarise long-format CSV data into pivot tables grouped by row and column keys.
Open Tool →Group By and Count
Aggregate CSV rows by one or more group-by columns with count, sum, mean, min, or max.
Open Tool →Filter CSV Rows by Condition
Keep or discard CSV rows based on flexible conditions applied to any column.
Open Tool →