# Excel Reshape

Swap the rows and columns of an Excel or CSV table (transpose), turn a wide table with a column per month into a long one (unpivot), or pivot long data back into a wide table. The result is built in your browser and saved as .xlsx or CSV.

- URL: https://tools.itlibra.com/en/excel-reshape
- On-device・No upload
- Last updated: 2026-10-23

## How to use

1. Choose an Excel (.xlsx) or CSV file with “Choose file”. “Try with sample” loads a monthly sales table built on your device.
2. Pick a conversion. “Transpose” swaps rows and columns. “Wide → long” keeps the columns you choose and gathers the others into “Item” and “Value”. “Long → wide” asks for the row labels, the column that becomes columns, and the value column.
3. Check whether row 1 is a header (item names). A table without a header is shown with letters A, B, C…
4. Check the preview, the change in rows and columns, and the counts of left-out rows and empty cells.
5. Download as Excel (.xlsx) or CSV (UTF-8 with BOM, Shift\_JIS and others).

## Use cases

- Turn a sales table with one column per month into month and amount columns for a pivot table
- Turn survey answers spread across question columns into one long list of questions and answers
- Rebuild long records as a cross-tab with dates as columns
- Swap rows and columns so that items read downwards
- Reshape a CSV into a layout that is easier to work with in Excel, then save it

## What it does

### Transposes rows and columns

Swaps rows and columns, including the header row. Rows with different numbers of cells are padded with blanks, so the result stays a clean grid.

### Wide to long (unpivot)

Choose the key columns to keep. The other columns are gathered into “Item” and “Value” columns. Empty cells can be left out or kept as empty rows, and both column names can be changed.

### Long to wide (pivot)

Choose the row labels, the column that becomes columns, and the value column. When the same row and column meet more than once, pick the first value, the sum, or a join.

### Keeps dates and numbers as their types

Dates are written as dates and numbers as numbers. Digits-only CSV cells become numbers, while codes with a leading zero such as 01 stay text.

### Check the result and the notes together

The first rows of the result and the change in rows and columns are shown, with counts of repeated values, non-numeric values and left-out rows or cells, before you save.


## Supported formats

### Input

- Excel (.xlsx / .xlsm, one sheet at a time)
- CSV (.csv, encoding detected)
- TSV (.tsv / .txt)

### Output

- Excel (.xlsx)
- CSV (UTF-8 with BOM / UTF-8 / Shift\_JIS / EUC-JP / UTF-16)


## Capability matrix

| Feature | Support | Notes |
| --- | --- | --- |
| Transpose (swap rows and columns) | Supported | — |
| Wide to long (unpivot) | Supported | Several key columns can be kept |
| Long to wide (pivot) | Supported | Repeated values: first, sum or join |
| Aggregates other than sum (average, count, max…) | Not supported | Use an Excel pivot table for these |
| Formulas, formatting, merged cells, charts | Not supported | Values only (formulas become their results) |
| Converting several sheets at once | Not supported | One sheet per run |
| Legacy Excel (.xls) | Not supported | Re-save as .xlsx in Excel first |

## Limits & notes

- Reads up to 100 MB and 3 million cells per file. The result is also limited to 3 million cells and to Excel’s grid (1,048,576 rows, 16,384 columns); beyond that, the conversion stops with an error.
- If empty cells are left out when reshaping to long, they come back as blanks when pivoted to wide. A column that is entirely blank, or a row whose values are all blank, does not come back.
- When the same row and column meet more than once in a pivot, they are combined with the chosen rule. Sum adds only numbers and leaves out non-numeric values.
- Columns with the same header name are treated as separate columns, so rename them first if needed.
- Works on a smartphone (390 px wide), but choosing columns takes many steps, so use a PC for large tables.

## Privacy & safety

Reading, converting and building the download all happen in your browser. File contents are never sent to or stored on a server.

## FAQ

### How do I swap rows and columns in Excel?

Choose “Transpose” and add the file. The preview shows the table with rows and columns swapped, and the header row moves to the first column.

### How do I unpivot a wide table into a long one?

Choose “Wide → long”, then tick the columns to keep (for example month or rep) that should not move. The remaining columns are gathered into “Item” and “Value”.

### How do I pivot a long table back to wide?

Choose “Long → wide” and pick the row labels (keys), the column that becomes columns, and the value column. When a row and column combination repeats, choose the first value, the sum or a join.

### Does it work with CSV files?

Yes. CSV encodings (Shift\_JIS, UTF-8 and others) are detected automatically, and digits-only cells are written as numbers. The result can be saved as Excel or CSV, including Shift\_JIS.

### Are dates and numbers changed?

Values keep their type, so dates stay dates and numbers stay numbers. Display formats such as thousands separators and colours are not carried over; set them in Excel after saving if needed.

### Are my files uploaded?

No. Everything runs in your browser; file contents never leave your device.
