CSV Transpose & Unpivot
Flip rows and columns, or reshape wide ↔ long, for Excel and Google Sheets.
Try before you buy.
- Free preview: the size of the reshaped table and its first rows (half of them, up to 10), with how many more there are; copy and downloads need a pass.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment unless you choose automatic renewal. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment unless you choose automatic renewal.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
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.
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
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. With a pass, the result copies as tab-separated text for pasting into Excel or Google Sheets, or downloads as CSV or Excel.
Without a pass, the free preview shows the size of the reshaped table and its first rows; copying it and the CSV and Excel files need a Pro pass.
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; with a pass, copy for Excel or Sheets, or download (the free preview shows the first rows).
Examples
Name | Jan | Feb Asha | 10 | 20 Ravi | 5 | 8
Name | Asha | Ravi Jan | 10 | 5 Feb | 20 | 8
Name | City | Jan | Feb Asha | Lisbon | 10 | 20
Name | City | Variable | Value Asha | Lisbon | Jan | 10 Asha | Lisbon | 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
On this device: nothing is sent
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What do I get without a pass?
Without a pass, CSV Transpose & Unpivot shows the size of the reshaped table and its first rows (half of them, up to 10), with how many more there are; copy and downloads need a pass. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment unless you choose automatic renewal, unlocks the full result. The pricing page lists the passes and their prices.
How do I transpose rows and columns from Excel?
Copy the range in Excel, paste it here and keep Transpose; with a pass, 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.
Learn more
Lessons on MySmartCoPilot Learn that use this tool:
- Pivot and unpivot in SQL: rows to columns and back Free lesson, Pro answers
- Tidy data: long vs wide, melt and pivot Free lesson, Pro answers
- Reshaping, stacking and splitting arrays Free lesson, Pro answers