Transpose CSV

Swap rows and columns of a CSV table.

Also called: swap rows and columns.

FreeNo sign-upRuns in your browser
DEVELOPER

Transpose CSV

Swap rows and columns of a CSV table.

Runs locally in your browser
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.

Find a tool

Loading tools…

Watch: how to use the Transpose CSV (12 seconds)

Recorded on a phone, steps written on screen, no sound.

About the Transpose CSV

Swap rows and columns of a CSV table, so the first row becomes the first column.

How transposing works

Rows become columns and columns become rows: the first row of your CSV becomes the first column of the result. A table of 3 rows and 12 columns (months across the top) turns into 12 rows and 3 columns.

If some rows are shorter than others, the missing cells are left empty, so nothing shifts into the wrong column. Quoted values with commas inside stay together, and the result uses commas between values.

How to use the Transpose CSV

  1. Enter your textType or paste CSV.
  2. Press Run toolThe result appears right under the button.
  3. Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.

This tool works inside your browser: what you enter stays on your device.

Example

A sample input and the result the Transpose CSV gives for it (produced by the tool itself, not typed by hand).

CSV
name,city,orders Ali,Lahore,12 Sara,Karachi,7 Bilal,Dubai,15

Result:

name,Ali,Sara,Bilal
city,Lahore,Karachi,Dubai
orders,12,7,15

Good to know

What you need
You type or choose: CSV
Where it runs
In your browser, on your device.
Cost
Free, no sign-up.

Questions

What about uneven rows?

Check your CSV with the CSV Consistency Checker first.

Can Excel do this?

Yes, with Paste Special → Transpose; this is quicker for CSV text.

More tools in Excel & Data

See all Excel & Data tools