Conversion Tools100% Client-Side

Transpose a CSV Table

Paste CSV to swap the two axes of its grid. A cell in the second row and third column moves to the third row and second column, so a table with two rows and three columns becomes three rows and two columns. The converter treats the first row like the rest of the data. This makes it useful when you need to reorient an entire table, including its headings.

Input
29 chars•2 lines
Output

How to Use the CSV Transpose Online

  1. 1Paste the complete CSV grid. Include the heading row when it should move with the body, and keep quotation marks around cells that contain commas.
  2. 2Count the original rows and columns, then check that the counts appear on opposite axes in the result.
  3. 3Inspect any rows that were shorter than the widest row. The transposed output uses empty cells for positions the source did not supply.
  4. 4Copy the result and confirm that the destination expects the original headings on the new axis before importing it.

Input & Output Examples

A two-row, three-column grid becomes three rows of two cells.

Input Sample
day,Mon,Tue
sales,4,7
Expected Output
day,sales
Mon,4
Tue,7

The missing value on the second input row becomes an empty cell in the last output row.

Input Sample
id,zone,active
A,north
B,south,true
Expected Output
id,A,B
zone,north,south
active,,true

Practical Developer Workflows

  • Change the orientation of a small report so its time labels appear down the side of a spreadsheet.
  • Rearrange a matrix fixture before testing software that expects the same values in a different orientation.
  • Inspect a rectangular export whose headings run across one axis and need to become labels on the other.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

Its row number and column number trade places. A value at row two, column three will appear at row three, column two. The cell contents remain text and are serialized as CSV on the other axis.

Explore Other Tools

12 suggested tools

View all tools