Skip to content

Transpose CSV

Swap CSV rows and columns, with optional header inclusion and a live shape preview.

Turn each row into a column. Header text can become the first output column.

LIVE RESULT

Rows become columns

Updating preview…

Export settings
Off preserves original values. On changes cells starting like formulas (=, +, −, @ or leading control characters); the preview shows the prefixes too. Spreadsheet behavior varies.
Processed on your device

How it works & useful details

Formats & limits

Import UTF-8 text up to 1.5 MB or paste up to 500,000 characters. CSV accepts comma, tab, semicolon or pipe separators, doubled quotes and line breaks inside quoted fields. All rows must have the same number of fields. A final line ending is ignored; interior blank rows are real rows. A leading UTF-8 BOM is removed. Up to 10,000 rows including the header, 100 columns, 100,000 cells and 50,000 characters per cell. Output is limited to 2,000,000 characters.

Live previews pause above 50,000 input characters; exports still process the full bounded input. The table pages through 15 rows and 12 columns at a time. Export includes every result row. Processing is synchronous and bounded; cancellation is checked before and after a transformation.

Data details

Text comparisons use Unicode code-unit order, with optional case folding. Numeric sorting/filtering requires finite numbers in every selected cell and uses JavaScript decimal precision; large integer identifiers need text mode. No trimming or spreadsheet formulas are evaluated.

CSV-to-JSON defaults to strings. JSON object export requires unique, nonempty headers. JSON input uses object keys in discovery order (integer-like keys follow JSON property order), missing properties become empty cells, and arrays must be rectangular. Primitive arrays get one “Value” column. Null becomes the literal text “null” by default; nested objects/arrays become compact JSON strings. Empty strings, missing values and optional empty nulls are indistinguishable in CSV. Mixed row shapes are rejected. JSON numbers use JavaScript precision; unsafe integers are rejected, so quote large IDs. Duplicate JSON names use the last value.

Transpose allows up to 100 source rows including the optional header, and exports all transposed cells as data. Spreadsheet formula protection is opt-in: it prefixes formula-like cells with an apostrophe, visibly changing their data. Spreadsheet programs differ; review results before opening them.

About this tool

Transpose CSV swaps rows and columns, turning a wide table into a tall one or vice versa. This is often the first step when a spreadsheet was laid out for reading but needs to be reshaped for a database import.

The preview shows the new shape before you export, and header handling is explicit so you can decide whether the first row and column are labels or data. Everything is processed locally.

How to use it

  1. Import a CSV file or paste the text.
  2. Decide whether the first row is a header that participates in the transpose.
  3. Check the live shape preview and adjust if the table looks wrong.
  4. Export the transposed CSV.

Worked example

A report with metrics in rows and months in columns,

Metric,Jan,Feb
Visits,120,135
Signups,8,11

transposes to months in rows and metrics in columns:

Metric,Visits,Signups
Jan,120,8
Feb,135,11

A 3 × 3 table stays 3 × 3, but in general an m × n table becomes n × m.

When to transpose

Charting tools and databases usually expect one record per row, with one column per variable. Many reports, especially those exported from finance tools or survey platforms, are laid out the other way around, with dates or categories across the top. Transposing turns such a wide report into a long, row-per-record shape that imports and charts cleanly.

Every row must have the same number of fields. A ragged row is reported instead of padded, because it usually means a delimiter or quote was misread and the data would shift. Include or exclude the header row depending on whether its labels should become the first column of the result.

Frequently asked questions

What happens to the header row?

You choose whether it is treated as the first data row of the transposed result or as a label that stays outside the data.

Are there limits on transposition?

Up to 100 source rows including the optional header; the transposed result must still fit the platform cell and export limits.

Can transposing lose data?

No cell content is dropped, but spreadsheet programs differ in how they interpret the result, so review the export before opening it in a new tool.

Is there a size limit?

The input is limited to 500,000 characters. Very wide results can be hard to read in spreadsheet software, which has column limits of its own.