Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

CSV Columns to Rows Converter

Transpose CSV data by converting columns into rows (matrix transpose)

Your files never leave your browser
CSV Input0 chars, 0 lines
Drag & drop a CSV file here, or browse
Accepts .csv, .tsv, .txt files
Transposed Output0 chars, 0 lines
Ready·

Flip your CSV columns into rows instantly — paste the data or drop a file, hit Transpose, and the matrix swaps. Quoted fields, commas inside values, uneven row lengths — all handled correctly. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste CSV Data
→
Matrix Transpose
→
Rows ↔ Columns Swapped

The tool parses your CSV into a 2D grid, then swaps row and column indices — cell [2][0] becomes cell [0][2], and so on. If some rows are shorter than others, it pads them with empty values so the grid stays rectangular. Quoted fields with commas or newlines inside them are preserved correctly through the whole process.

Examples

Student Grades Report

A teacher exported grades in columns by subject. The school’s system needs one subject per row instead.

INPUT
name,math,science,english Alice,92,88,95 Bob,78,91,84
OUTPUT
name,Alice,Bob math,92,78 science,88,91 english,95,84

Monthly Sales Figures

Sales data organized by month across columns, but your chart tool wants months as rows.

INPUT
product,jan,feb,mar Widget A,1200,1350,1100 Widget B,800,920,1050
OUTPUT
product,Widget A,Widget B jan,1200,800 feb,1350,920 mar,1100,1050

Survey Responses with Quoted Text

Survey answers that contain commas inside quoted fields — a common source of broken transpositions in other tools.

INPUT
id,city,feedback 1,"Portland, OR","Good, fast" 2,"Austin, TX","Needs work"
OUTPUT
id,1,2 city,"Portland, OR","Austin, TX" feedback,"Good, fast","Needs work"

Who Uses This

👨‍💻 Developers

Reshape API response data before loading it into a database or data pipeline.

📊 Data Analysts

Pivot wide-format datasets into long format for tools like R, Python pandas, or Tableau.

🎓 Students

Transpose homework datasets without installing extra software or writing code.

📋 Project Managers

Flip exported spreadsheet reports so timelines run top-to-bottom instead of left-to-right.

Common Mistakes

Pasting tab-separated data as CSV

If your columns are separated by tabs (from Excel copy-paste), the tool treats the entire row as one field. Convert tabs to commas first, or save as .csv from your spreadsheet app before pasting.

Forgetting the header row

The first row is treated just like any other row during transposition. If you paste data without headers, the first data row becomes the first column of the output. That’s usually fine — but double-check your result if the layout looks off.

Unquoted fields that contain commas

A value like New York, NY without quotes around it gets split into two fields. Wrap any value containing a comma in double quotes: "New York, NY". Most spreadsheet apps handle this automatically on export.

Technical Details

Frequently Asked Questions

How do I convert CSV columns to rows in Excel?

In Excel, you’d copy the range, right-click, choose Paste Special, and check “Transpose.” That works for small tables, but it doesn’t handle updates well — you have to redo it every time. This tool is faster for one-off transpositions, especially with large files where Excel might lag.

What is the difference between transpose and pivot?

Transpose simply flips rows and columns — it’s a mirror operation on the grid. Pivot is more complex: it reshapes data by grouping and aggregating values around specific columns. If you just need columns swapped to rows (no math, no grouping), transpose is what you want.

Can I transpose a CSV file with 1000+ columns?

Yes. The tool processes everything in memory, so it can handle wide files. On a typical laptop, transposing a CSV with 1,000 columns and 500 rows takes under a second. If your file has tens of thousands of columns, you might notice a brief pause, but it’ll still work.

Does transposing preserve my data types?

CSV is a plain-text format — it doesn’t store data types. Numbers, dates, and text all come through as strings. The transpose operation preserves every character exactly as it was. When you open the output in Excel or another tool, those programs will re-interpret the types on their own.

Is my CSV data safe using this online tool?

Your data never leaves your device. The transposition runs entirely in your browser’s JavaScript engine — no server requests, no cookies, no storage. You can disconnect from the internet after loading the page and it’ll still work. Nothing is logged or tracked.

Share: