Transpose Rows and Columns

Flip a CSV table so columns become rows and rows become columns, with the first line of the result explained.

Files stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Transpose table controls

Drop your CSV file here

or choose one from your device

One UTF-8 CSV or TSV file. Use either this or the pasted text, not both.

    Paste the table, or leave this empty and choose a file. Values are kept exactly as they appear in the text.

    With this on, the names row becomes the heading of the result. With it off, every row is data and the result gets generated column_1, column_2 names.

    Keeping the names row answers the usual question: each source column becomes one row labelled by its heading. The every-row mode treats the names row as ordinary data and names the output columns column_1 and up.

    A cell whose first visible character is = + - or @ receives an apostrophe, so a spreadsheet reads it as text. The prefix changes the stored value.

    How to use Transpose Rows and Columns

    1. Paste the table or choose a CSV file.
    2. Leave The first row holds the column names on when the opening line names the columns.
    3. Pick what to transpose: the rows with the names row as the heading, or every row including the names row.
    4. Press Transpose table, check the first line of the preview, then download the CSV.

    Example: Transpose Rows and Columns

    Turn three people listed down a table into three lines of values.

    You add
    Pasted text name,age,city with the rows Ana,30,Bristol and Lee,25,Leeds. What to transpose: The rows, keeping the names row as the heading. Formula protection: on.
    You get
    The result holds three lines: name,Ana,Lee then age,30,25 then city,Bristol,Leeds. The page reports a 3 x 2 source and a result with three columns and three lines.

    Options

    The rows, keeping the names row as the heading
    The whole grid is flipped and the source first column becomes the first line of the result, which is how a spreadsheet paste-transpose of a labelled table looks. Each later line is one more source column.
    Every row, including the names row
    The same flip, but the first line of the result is generated column_1, column_2 and so on. Use it when the opening line is data rather than labels, or when you want every value in a data row.
    The first row holds the column names
    With this off, no row is treated as a names row, so the result always starts with generated column names and every source line is data.

    Supported inputs and limits

    Paste up to 20,000,000 characters or choose one UTF-8 CSV or TSV file up to 20 MiB. The source is limited to 500 columns and 500 physical rows, including its header when present, so the flipped result also stays within 500 columns. A table with one column flips into a single line of values. Cells remain text: 0012 keeps its leading zeros and numbers are not rounded. Spreadsheet-formula protection adds an apostrophe to formula-like cells by default; disabling it can allow a spreadsheet to run those cells.

    Where your input is processed

    This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

    Where the heading row goes

    A transpose swaps the two axes. The worked example has three columns and three physical rows, including the header; it becomes three lines with three values each. In labelled mode the source first column becomes the output header. In every-row mode the transposed values remain data under generated column names.

    Questions about Transpose Rows and Columns

    Why does my result start with the first column of the source?

    Flipping a labelled table moves the source first column onto the first line, because CSV has no separate way to mark a row as a heading. That first line holds Name, Ana, Lee in the worked example.

    When should I use the every-row mode?

    When the opening line is a real record rather than column names, or when you want the names row itself to become a line of values in the result.

    What happens to leading zeros?

    They stay. Every cell keeps the characters it had, so 0012 is written as 0012 and is never read as the number twelve.

    Can a big table be too large to flip?

    More than 200 physical lines, counting the names row, or more than 500 columns is refused before anything is flipped. Each source line becomes a column in the result, so those two limits together keep the flipped table at 200 by 200 at most.

    Project manager: Tony Hines · Content updated 4 October 2026 · Report a problem