ETEvoraTools
CSV & TSV Tools

CSV Transposer

CSV Transposer parses comma-separated rows, finds the widest row, and creates one output row for each original column. Short rows contribute empty cells. Every emitted cell is CSV-escaped. Headers receive no special treatment, memory grows with the full matrix, and uneven input can produce padding that may hide data-quality problems.

Runs locally — files stay on your device
Quick answer

What happens when rows have different lengths?

Short rows are padded with empty cells up to the widest row.

Transposition swaps matrix axes

Cell at input row r, column c moves to output row c, column r. A rectangular matrix is assumed, so ragged rows need padding.

How it works

All rows are parsed, maximum width is calculated, and nested iteration reads the ith cell from every row.

Key concepts

Header is ordinary row

It becomes the first cell of every output row.

Padding is synthetic

Empty output cells may not have existed in source.

When to use it

  • Rotate a small rectangular dataset.
  • Turn header fields into a first column.
  • Inspect records by field rather than row.

When not to use it

  • Do not transpose huge datasets in memory.
  • Do not ignore ragged-row padding.
  • Do not expect headers or types to be interpreted.

Worked examples

2×2

Input
a,b\n1,2
Expected output
a,1\nb,2

Axes swap.

Short row

Input
a,b\n1
Expected output
a,1\nb,

Missing value is padded.

Quoted comma

Input
"a,b",c
Expected output
"a,b"\nc

Output escaping protects the comma.

Common mistakes

Assuming header semantics

No special header model exists. Correction: Review the first output column.

Missing ragged rows

Padding can look like real blanks. Correction: Validate widths before transposing.

Using for large matrices

Everything is held in memory. Correction: Use streaming/dataframe tooling.

Best practices

  • Validate a rectangular shape.
  • Keep row/column labels explicit.
  • Check the transposed dimensions and sample cells.

Related operations and differences

CSV Column Remover

Choose CSV Column Remover when you need to remove one CSV column by header name.; use CSV Transposer specifically for csv transpose.

CSV Formatter

Choose CSV Formatter when you need to normalize CSV quoting and row structure.; use CSV Transposer specifically for csv transpose.

CSV to JSON

Choose CSV to JSON when you need to convert a header-based CSV table to JSON.; use CSV Transposer specifically for csv transpose.

CSV to TSV

Choose CSV to TSV when you need to convert comma-separated data to tab-separated data.; use CSV Transposer specifically for csv transpose.

JSON to CSV

Choose JSON to CSV when you need to convert an array of JSON objects to CSV.; use CSV Transposer specifically for csv transpose.

TSV to CSV

Choose TSV to CSV when you need to convert tab-separated data to CSV.; use CSV Transposer specifically for csv transpose.

Limitations and privacy

  • Full in-memory matrix.
  • No header mode, row-width warning, type/schema preservation, custom delimiter, large-data streaming, formula defense, or download.

The pasted data is parsed and transformed locally in this browser.

Frequently asked questions

Are headers preserved?

They are transposed as ordinary cells.

Are short rows rejected?

No.

Is output CSV-escaped?

Yes.

Can the operation be reversed?

For a rectangular parsed matrix, transposing twice generally restores it.

References