How to use the CSV transposer
- Press Choose a file to load a CSV, TSV, text or Excel file, or paste your table into CSV data.
- Leave Delimiter on Detect automatically, or choose comma, semicolon, tab or pipe if the guess is wrong.
- The result appears at once. Check the Rows × columns line and the preview table.
- Copy the Transposed CSV or press Download to save
<name>-transposed.csv.
What it does and when to use it
Transposing turns a wide table into a long one, or the reverse. A monthly report with metrics down the side and months across the top is easy to read, but a chart or database usually needs months down the side and one column per metric. A survey export with one column per respondent may need one row per respondent instead.
After flipping, you can chart the result straight away with the line chart maker or the bar chart maker, whose data format is labels in the first column and one column per series. If the file has extra columns you do not need after the flip, the CSV column extractor can drop them.
How it works
The input is parsed with PapaParse, which understands quoted fields that contain commas or line breaks, and blank lines are skipped. The tool then:
- finds the longest row and pads shorter rows with empty cells;
- builds a new table where new row j is made from column j of every original row, so cell (row i, column j) moves to (row j, column i);
- writes the result with the same delimiter as the input, quoting only the fields that need it.
The stats line shows the shape before and after, for example 2 × 3 → 3 × 2. The preview uses the new first row as its heading. All of this happens in your browser; the file is not uploaded.
Worked examples
Monthly metrics (the sample). The input has three metrics as rows and three months as columns:
Metric,Jan,Feb,Mar
Visitors,1200,1350,1610
Sign-ups,84,97,120
Conversion %,7.0,7.2,7.5
The transposed file has one row per month:
Metric,Visitors,Sign-ups,Conversion %
Jan,1200,84,7.0
Feb,1350,97,7.2
Mar,1610,120,7.5
A short row. a,b,c above 1,2. The second row is padded to three cells first, so the result is a,1, b,2 and c, with an empty last value. The stats read Rows × columns: 2 × 3 → 3 × 2.
Limits and tips
- Very wide results are hard to read in some programs; a file with 5,000 rows becomes 5,000 columns.
- Spreadsheet files are read from their first sheet only, with cells as they are displayed.
- To tidy stray spaces and blank columns before flipping, run the CSV cleaner first.
Frequently asked questions
When would I need to transpose a CSV?
What happens with rows of different lengths?
Is there a header option?
Are numbers or dates changed?
Can I transpose twice to get the original back?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.