Transpose Rows and Columns

Transpose CSV or Excel rows and download CSV or tab-separated text.

On-device No sign-up Free to use

Transpose table controls

Drop your table file here

or choose one from your device

One UTF-8 CSV or TSV file, or one XLSX workbook. A chosen file is used instead of the pasted text.

    ?

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

    ?

    Only for a workbook. Leave empty to read the first visible worksheet, or name one, such as Sales, or give its 1-based number.

    ?

    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.

    ?

    Formula-like values receive an apostrophe prefix in the download. This changes the stored text; review the result in your spreadsheet.

    ?

    TSV separates columns with tabs. Use a matching import or paste setting in your spreadsheet.

    Result

    Showing an example.

    Move name, age and city columns into rows while keeping both people's values.

    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.

    Loading the tool. Your result will appear here.

    https://usefreetools.net/transpose-rows-columns · 20 November 2026

    Was this helpful?

    How to use Transpose Rows and Columns

    1. Paste CSV/TSV text or choose a CSV, TSV or XLSX file. A selected file replaces the text; for XLSX, choose a worksheet if needed.
    2. For text input, indicate whether the first row contains column names. XLSX intake uses the worksheet's first row as headings.
    3. Choose labelled mode to use the source first column as the result header, or every-row mode to retain the flipped values under generated column names.
    4. Run Transpose table and inspect the first line and row/column counts. Download CSV with the source separator or choose TSV to force tabs.

    Example: Transpose Rows and Columns

    Move name, age and city columns into rows while keeping both people's 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

    CSV or TSV text
    Paste the table, or leave this empty and choose a file. Values are kept exactly as they appear in the text.
    Worksheet name or number
    Choose the worksheet used for transposition. An empty choice uses the first visible sheet; otherwise enter its name or 1-based position.
    The first row holds the column names
    For transposition, enable this when the first record names the columns. Without headings, refer to columns by their 1-based positions.
    What to transpose
    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.
    Protect spreadsheet formulas in the download
    CSV and TSV exports can prefix formula-like values with an apostrophe. The prefix changes stored text; review the import in your spreadsheet.
    Download format
    CSV keeps the input table's separator; XLSX input uses commas. TSV forces tabs. Use a matching import setting in your spreadsheet.

    Supported inputs and limits

    • Chosen CSV/TSV/XLSX input replaces pasted text.
    • Up to 20 MiB, 100,000 source rows, 500 source columns and 2,000,000 cells; transposed shape must also fit output bounds.
    • Keep headings as row labels or transpose them as data.
    • TSV output can be pasted into a spreadsheet.
    • CSV/TSV protection prefixes risky values and changes those stored strings.

    Where your input is processed

    This tool does not upload your inputs. See the limits for anything saved 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?

    A text cell such as 0012 is written with those digits intact. Spreadsheet software may infer a number when importing CSV/TSV, so import identifier columns as text. A numeric XLSX cell cannot recover leading-zero formatting that is not part of its stored value.

    Can a big table be too large to flip?

    Yes. The source has at most 500 columns, and transposing more than 500 physical source rows would exceed the result's 500-column limit. The input reader's larger row allowance does not override that output-shape check. Split a taller table before transposing it.

    Page updated · Project managed by Tony Hines · Report a problem with Transpose Rows and Columns

    Related reading

    All guides