CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Data
How-to

How do I transpose the rows and columns in a CSV?

Short answer

Paste your CSV into a browser-based CSV transpose tool and it flips the grid so the first row becomes the first column and vice versa, using a real parser that respects quoted fields. The transpose runs on your device, so a data table is never uploaded, and it saves you from rebuilding the layout by hand.

What transposing actually does

Transposing a table rotates it around its diagonal: the value that sat in row 3, column 2 ends up in row 2, column 3, so headers that ran across the top now run down the side. It is the same operation as the transpose feature in a spreadsheet, and it is useful when a dataset arrived in the wrong orientation for the chart, import or view you need, for example when each record is a column instead of a row.

Why a parser, not a script, does it right

Flipping a CSV sounds like a one-liner until a field contains a comma or a line break inside quotes, at which point a naive split scrambles the whole grid. A tool that parses the CSV properly before transposing keeps those quoted values whole and re-quotes them correctly in the output. Because the parsing and rewriting happen in your browser, real data stays on your device throughout.

Step by step

  1. Paste the CSV. Paste your CSV grid, including the header row, into the tool.
  2. Transpose locally. The tool flips rows and columns in your browser, respecting quoted fields.
  3. Copy the result. Copy the transposed CSV for your chart, import or view.

Frequently asked questions

What does transposing a CSV mean?

It flips the table so rows become columns and columns become rows, the same as a spreadsheet transpose.

Are quoted fields preserved?

Yes. A real CSV parser keeps quoted values intact and re-quotes them correctly after flipping.

Is my CSV uploaded?

No. The transpose runs entirely in your browser.

Related answers