SmartQueryTools

Transpose CSV Files Online

Transpose CSV files — flip rows and columns — directly in your browser. No upload, no server.

How to transpose CSV files

  1. Drop your file onto the upload area. The tool shows the row and column count and previews the first 200 rows.
  2. Check the notice above the preview. Files with more than 500 rows are transposed using only the first 500 rows.
  3. Click Transpose. Each original column becomes a row, and the counts update to show the new shape.
  4. Review the transposed table, then click Download CSV. The result is always saved as a CSV file named after your input with _transposed added.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A web team keeps quarterly visit totals with one row per region. A slide template needs the quarters running down the page and the regions across the top.

Input (CSV)

region,q1_visits,q2_visits,q3_visits
North,1840,2105,1990
South,960,1130,
West,2410,2290,2675

Settings

  • No options. The first 500 rows are transposed (this file has 3).

Result

FieldRow_1Row_2Row_3
regionNorthSouthWest
q1_visits18409602410
q2_visits210511302290
q3_visits19902675

Three rows and four columns become four rows and four columns. The old header names move into a new first column called Field. The new headers are Row_1, Row_2 and Row_3, not the region names. Every value is written as text, and the missing Q3 figure for South becomes an empty cell.

Working with CSV files

The CSV header row is not transposed as data. Its names become the values of the Field column, and the data rows become Row_1, Row_2 and so on. Because the file is parsed before it is flipped, each value is written back from its detected type. A price stored as "4.50" comes out as 4.5, and an all-digit ID column such as "00731" loses its leading zeros.

Empty CSV fields are read as NULL and come out as empty cells in the transposed file. Any value that contains a comma, a double quote or a line break is wrapped in double quotes, so a note such as "late, then cancelled" stays in one cell. The download uses plain newline line endings and has no byte order mark. If your CSV has many columns and only a handful of rows, such as a settings export, the transposed version is often easier to read in a narrow window. You can compare two records by reading down Row_1 and Row_2 side by side.

Frequently Asked Questions

Why did my CSV lose leading zeros after transposing?

The column was detected as a number when the CSV was loaded, so 00731 was stored as 731 before the flip. Cast that column to text with the Cast Columns tool, save it, then transpose the result.

Can I use the first CSV column as the new header row?

Not in this tool. The headers are always Field, Row_1, Row_2 and so on. Open the result and rename the columns with the Rename tool, or edit the first line of the CSV by hand.

What do the column headers look like after transposing?

The first column is called Field and holds your original column names. The other columns are named Row_1, Row_2 and so on, one per original row. The values in your first column do not become headers.

Is there a row limit?

Yes. Only the first 500 rows are transposed, which gives at most 501 output columns. The tool warns you before you click Transpose if your file has more rows than that.

What format is the transposed file saved in?

Always CSV, whatever format you uploaded. All values are written as text and empty values become empty cells.

Related Tools