Home Tools Blog About

Convert CSV Rows to Columns

In short

online CSV transpose tool. Converts rows to columns with RFC 4180 quoted-field support. Client-side, instant, secure - no uploads.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Flip a CSV so its rows become columns (wide data → long data, or vice-versa). Handles quoted fields, tabs, semicolons, and pipes. Runs entirely in your browser.

🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Convert CSV Rows to Columns

  1. Paste the CSV into the input area. Here the sample is arranged with the labels in the first column instead of the first row - a typical wide-format layout that you often want to flip.
  2. Choose the delimiter your source uses: Comma (default), Tab, Semicolon, or Pipe. The output uses the same delimiter so a round-trip is lossless.
  3. Keep parser as RFC 4180 for real-world CSVs. Quoted cells that contain the delimiter, newlines, or escaped "" survive the flip intact. Switch to Simple only if your CSV is guaranteed to have no quoted fields.
  4. Optional toggles. Keep blank rows preserves empty lines instead of dropping them. Trim cell whitespace strips leading/trailing spaces before transposing.
  5. Press "Transpose" (or Ctrl+Enter). Live preview also runs 200 ms after you stop typing. Stats show the matrix-shape change, how many cells were padded for jagged rows, and any quoted fields detected.
  6. Copy or download. Copy sends output to your clipboard. Download saves a transposed-*.csv file. Run the result through the tool again to get the original orientation back.

Frequently Asked Questions

What does “rows to columns” actually change in my data?

Every input row becomes a column in the output – equivalently, every input column becomes an output row. If your source has labels running down the left and observations across the top (wide format), transposing flips it so labels are across the top and observations run down (long format). Shape N×M becomes M×N.

How is this different from the “CSV columns to rows” tool?

Mathematically the operation is identical – matrix transpose is its own inverse. Two pages exist because users search with both phrasings. Whichever you open, the mechanics are the same. Feed either tool’s output back in to restore the original layout.

Does the tool handle RFC 4180 CSV with quoted cells?

Yes – that’s the default parser. It recognises double-quoted fields, allows embedded delimiters and newlines inside quotes, and decodes "" as a literal double quote. Output is auto-quoted when any cell contains the delimiter, a newline, or a double quote.

What happens to rows that have different lengths?

The tool finds the longest row and pads every shorter row with empty strings up to that width before transposing. The stats line reports how many empty cells were added, so jagged input doesn’t silently corrupt the grid.

My CSV has only one column – can I flip it into a single row?

Yes. An input of applenbananancherry (three rows, one column) becomes apple,banana,cherry (one row, three columns). Same applies for single-row inputs in the opposite direction.

Is the tool free and does it upload my CSV anywhere?

It’s free with no account. And no – nothing is uploaded. All parsing, transposing, and serialisation happens locally in your browser with plain JavaScript. You can disconnect from the network after the page loads and the tool still works.

How large a CSV can the browser handle?

Up to around 100,000 cells (e.g., 1,000 rows × 100 columns) completes well under a second. Beyond that the bottleneck is usually the output textarea repainting, not the parse. For truly massive datasets, stream-splitting tools like DuckDB or awk are a better fit.

Does the tool normalise line endings?

Yes. Any mixture of rn (Windows) and n (Unix) is normalised to plain n before parsing, so the output uses consistent line endings. A UTF-8 BOM at the start of the input is also stripped automatically.

Can transposing twice corrupt my data?

In RFC 4180 mode, no – a transpose-then-transpose round trip is lossless for standards-compliant CSV. In Simple mode, round-trips corrupt any row that contains quoted delimiters (because the first pass splits them wrongly). That’s why RFC 4180 is the default.

What are real reasons to flip rows into columns?

Common ones: flipping a timeline CSV (dates as column headers, metrics as rows) into a “long” format that charting libraries want; restructuring exports from old survey tools; rotating a vertical key/value list into a proper table; or preparing data for a pivot operation that expects the axes swapped.

Keep going

Related Tools

All Csv tools →
Share

Embed this tool

Add this free tool to your website. Copy and paste the code: