Reshape

Flip rows and columns in a CSV—convert wide to tall or tall to wide

Flip a CSV matrix by turning rows into columns and columns into rows.

🛡️ Your rows never leave your browser.
Why Onfyt: Pure matrix transpose (not melt/pivot)—ensures cell positions are exactly swapped without reshaping logic that adds or removes rows.

Interactive Sample Data

metricQ1Q2Q3
Revenue450052004800
Costs210024002000

How this tool works

Transposing a matrix is distinct from pivoting or unpivoting. In a true transpose, every cell at position (row R, col C) moves to position (row C, col R). This operation is needed when a data source delivers metrics as rows and time periods as columns, but your target system expects the opposite orientation—for example, many BI tools require time as the row axis. DataFix performs a true matrix transpose: the original column headers become the first column of the transposed table, and the original first column becomes the new header row. Transposing rotates a rectangular data matrix 90 degrees, turning rows into columns and columns into rows. Financial models, pivot summaries, and scientific experiment logs frequently organize observations across columns rather than rows, requiring transposition before ingestion into relational tables or tidy data formats. DataFix rotates high-dimensional datasets in browser memory, swapping axis headers and row indices while preserving data types and handling asymmetric dimensions cleanly. Transposing matrices by converting rows into columns is required when restructuring financial statements, survey respondent matrices, and time-series reports into relational data models. Our in-memory transposer swaps dimensional axes reliably without losing column metadata.

Things that usually go wrong

  • Transposing a file with more columns than rows is fine, but the output may be very wide.
  • If the input has no header row, the first row is still treated as a header during transposition.

Edge cases we tested

🧪 Non-square matrix (3 rows × 5 columns)

Output is 5 rows × 3 columns—correctly transposed.

🧪 Cells containing commas or quotes

RFC 4180 quoting preserved through the transpose operation.

🧪 Numeric-only matrix with no text header

Transposed correctly; first row used as header unless overridden.

Frequently Asked Questions

When would I need to transpose a CSV?

When metrics are listed as rows and dates as columns (wide format) but your analytics tool expects dates as rows and metrics as columns (tall format).

Does transposing lose any data?

No. The operation is fully reversible — transpose the output again to get back the original.

Related tools

Reshape

Pivot a CSV

Summarise long-format CSV data into pivot tables grouped by row and column keys.

Open Tool →
Reshape

Group By and Count

Aggregate CSV rows by one or more group-by columns with count, sum, mean, min, or max.

Open Tool →
Reshape

Filter CSV Rows by Condition

Keep or discard CSV rows based on flexible conditions applied to any column.

Open Tool →