CSV Transpose & Unpivot
Flip rows and columns, or reshape wide ↔ long — then paste straight back into Excel.
1. Table
Paste a range copied from Excel or Google Sheets, or open a CSV or Excel file.
Or paste the table (from Excel, Google Sheets or a CSV)
2. Reshape
Rows become columns and columns become rows — the header row too. Short rows are filled with empty cells first.
3. Result
Copy puts tab-separated text on the clipboard: click a cell in Excel or Google Sheets and paste.
About the CSV Transpose & Unpivot
Reshape a table in three ways. Transpose turns rows into columns and columns into rows — paste a range copied from Excel, flip it and paste it back. Unpivot (also called melting or gathering) turns a wide table, such as one column per month, into long rows of name, month and value — the shape pivot tables, charts and databases want. Pivot does the opposite: it spreads long rows into columns again, one per value of a column, and combines cells that get more than one value with a sum, average, count, the first or last value, or all of them joined.
Short rows are filled with empty cells, quoted cells and line breaks inside cells are read correctly, and you choose which columns identify a row. The result copies as tab-separated text for pasting into Excel or Google Sheets, or downloads as CSV or Excel.
How to use it
- Paste a range from Excel or Google Sheets, or open a CSV or Excel file. Check First row is the header.
- Choose Transpose, Unpivot (wide → long) or Pivot (long → wide).
- For unpivot, tick the columns that identify a row (a name, an ID); the other columns become rows. Name the two new columns.
- For pivot, tick the columns that make a row, then pick the column whose values become the new column names and the column that fills the cells, and how to combine repeated values.
- Check the preview, then copy for Excel or Sheets, or download.
Examples
Name | Jan | Feb Asha | 10 | 20 Ravi | 5 | 8
Name | Asha | Ravi Jan | 10 | 5 Feb | 20 | 8
Name | City | Jan | Feb Asha | Pune | 10 | 20
Name | City | Variable | Value Asha | Pune | Jan | 10 Asha | Pune | Feb | 20
Name | Month | Sales Ravi | Jan | 3 Ravi | Jan | 4.5 Ravi | Feb | 2
Name | Jan | Feb Ravi | 7.5 | 2
Common uses
- Flipping a report so that dates run down instead of across.
- Preparing wide survey or sales sheets for a pivot table, a chart or a database (long format).
- Turning a long export (one row per student and subject) into a grid with one column per subject.
- Swapping the rows and columns of a range before pasting it into another sheet.
Wide and long tables
A wide table has one column per variable value (Jan, Feb, Mar …); a long table has one row per observation (name, month, value). Most analysis tools want the long shape, described as tidy data in Hadley Wickham’s paper: every variable a column, every observation a row. Unpivot turns wide into long — each value column becomes rows of its name and value, beside the columns you keep — and Pivot turns long into wide.
Combining repeated values when pivoting
When two rows have the same row keys and the same new-column value, their values land in one cell. Choose how to combine them: the first or the last value, the sum, average, smallest or largest (numbers such as 1,250.50, 1.250,50, $1,000 or ₹ 1,000 are read as numbers, other text is left out and counted), the count of values, or all values joined with commas. The page says how many cells were combined. Sums and averages are written without binary rounding noise (0.1 + 0.2 gives 0.3).
Limitations
- Files up to 100 MB as CSV or 50 MB as a workbook; the whole table is reshaped in your browser’s memory, and copying is limited to tables of about 2 million cells (download larger ones).
- Pivoting makes one column per distinct value: a column with thousands of values gives thousands of columns (an Excel sheet holds 16,384).
- Cells are moved as text; formulas in a workbook come across as their values.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
How do I transpose rows and columns from Excel?
Copy the range in Excel, paste it here, keep Transpose and select Copy for Excel / Sheets. Click the cell where the result should start and paste.
What is the difference between unpivot and transpose?
Transpose swaps the whole table. Unpivot keeps the identifying columns as they are and turns each of the other columns into rows of “heading, value” — so a table with 12 month columns becomes 12 rows per name.
What happens to duplicate rows when I pivot?
Their values are combined in one cell with the method you choose — sum, average, count, first, last, smallest, largest or all values — and the page tells you how many cells that affected.
Is my data uploaded?
No. The table is reshaped in your browser; nothing is sent anywhere.