Skip to content
TextArray
100% local

Transpose text

Swap rows and columns of delimited text — the first line becomes the first column and back again.

Input
Output

Transpose text

Paste tab-, comma-, semicolon- or space-separated text and the tool flips it around its diagonal: the cell in row 1, column A lands in row A, column 1. A list of records where every line is one entry becomes a table where every line is one field — headers down the side instead of across the top — and running it again flips it straight back.

Transposing is the fix for data that arrives rotated the wrong way. A row of dates that should be a column before pasting into a spreadsheet, spreadsheet output copied as rows when your script wants columns, a wide one-line CSV that would be readable as a narrow list, or a comparison table whose criteria should run down the side rather than along the top. Spreadsheets can do this with paste-special, but for a quick text snippet this is faster — and it works in plain text, no spreadsheet needed.

Choose the delimiter your data uses; tab is the default and matches what copying spreadsheet cells produces. "Output delimiter" is normally "Same as input", but you can convert while transposing — read tabs in, write commas out. Ragged rows are handled gracefully: shorter lines simply yield empty cells, and trailing empty cells are trimmed from each output line so no stray delimiters pile up at line ends.

Your data is transformed entirely in your browser and never uploaded anywhere, so exports with real names and numbers are safe here. Copy the result or download it as a .txt file.

FAQ

What exactly does transposing do?
It swaps rows and columns: the value in line 2, column 3 moves to line 3, column 2. A grid of 3 lines × 4 columns becomes 4 lines × 3 columns. Transposing twice returns a rectangular grid to the original.
What happens with rows of different lengths?
Missing cells are treated as empty strings, so nothing shifts out of place. Trailing empty cells are trimmed from each output line, which keeps line ends free of dangling delimiters.
Can I change the delimiter at the same time?
Yes. Set "Delimiter" to what the input uses and "Output delimiter" to what you want out — for example read tab-separated spreadsheet cells and write a comma-separated line.
Does it handle quoted CSV fields?
No — the text is split on the raw delimiter, so a comma inside quotes counts as a separator. For quoted CSV, convert the delimiter to tab first (see the CSV delimiter tool), then transpose.
Is my data uploaded anywhere?
No. The transformation runs entirely in your browser and your data never leaves your device.