Transpose CSV (swap rows and columns)

Paste CSV to flip it, useful when headers sit in a column and you need them in a row, or the other way round.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter csv data, cell delimiter and trim spaces around each cell.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

The cell at row i, column j moves to row j, column i. The output keeps the same delimiter as the input.

Example

Inputs: Cell delimiter = Detect automatically, Trim spaces around each cell = no. Result: Transposed CSV: product,Tea,Coffee,Dates price,12.5,18,30 qty,3,2,1; Rows: 3; Columns: 4.

product,price,qty
Tea,12.5,3
Coffee,18,2
Dates,30,1
product,Tea,Coffee,Dates
price,12.5,18,30
qty,3,2,1

Limits and caveats

  • The whole table is flipped at once; a partial range cannot be flipped.
  • With automatic detection the output uses the detected delimiter.

Questions about this tool

Is this like Excel TRANSPOSE?

Yes, the result is the same, but it works on CSV text without opening a spreadsheet.

What if rows have different lengths?

Short rows are padded with empty cells first so the table stays rectangular.

Does it affect quoted cells?

No. A cell containing a comma stays one cell and is quoted in the output.