Skip to main content

Transpose table

Swap rows and columns in an Excel, CSV, or JSON table. Processed locally in your browser without uploading the file.

  • Export
Automate

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Swap table rows and columns to reorganize tabular data quickly.

Your files are processed locally in your browser and are never sent to our servers.

Drop your file here

Recommended size: up to 30 MB

Was this tool useful?

On this page

How does this tool work?

Transposing changes a table’s orientation: original columns become rows and each source record becomes an output column. It is useful for comparing a few records side by side or adapting a small matrix to another layout. The first output column, field, contains the original headings; subsequent columns are called row_1, row_2 and so on. This operation does not group categories, calculate totals or turn monthly columns into variable/value pairs in the way Unpivot does.

Import CSV, TSV, XLSX, XLS or flat tabular JSON. The drop zone accepts up to 30 MiB per file. Processing stays in your browser, although a long input can create an extremely wide and unwieldy result. Workbook imports use the first sheet, without a sheet selector here. Styles, column widths, merged cells, macros and live formulas are not transposed as an Excel layout. The result consists of imported table values rather than a preserved workbook presentation.

Column names are collected in their first appearance order. Each becomes a value in the output field column. The first source record supplies row_1, the second supplies row_2; a business field is not automatically promoted to a heading. A product name stored in a cell therefore stays a cell value. The numbers in row_1 and row_2 identify record positions, not physical file line numbers including the header or multiline quoted cells.

Scalar values retain their contents. A property missing from a JSON record becomes null in the matrix. No sorting, cleaning, aggregation or deduplication is applied. Preview the new orientation, then export the full result as CSV or XLSX, including records beyond the displayed preview. Three source columns and two records produce three rows and three columns: field and two data columns. Keep source headings meaningful so each new row remains understandable.

How to use this tool

  1. Choose the right reshape

    Transpose when the whole orientation must change. Use Unpivot to retain identifiers while unfolding monthly columns, or Pivot when categories need aggregation.

  2. Import a manageable table

    Prepare the first sheet and inspect headings. Estimate output width from source record count: thousands of records become thousands of columns.

  3. Read the new coordinates

    Check field and row_1 against a known record and inspect missing cells. Export after confirming that generated column names suit the receiving system.

Use cases

Compare a few products

Place attributes from two or three products side by side to compare price, weight and reference.

Reorient a short matrix

Adapt a compact table for software expecting measurements in rows rather than columns without recalculating values.

Inspect wide records

Turn a handful of wide records into a vertical view where each original field is easy to examine.

Examples

Compare two products

Product, price and stock become three rows. The products occupy row_1 and row_2; their names remain cell values.

Input

product;price;stock
A;12;5
B;18;3

Result

field;row_1;row_2
product;A;B
price;12;18
stock;5;3

A missing JSON property

Score exists in the first record. Its absence from the second becomes null, exported as an empty CSV cell.

Input

[{"city":"Leeds","score":7},{"city":"York"}]

Result

field;row_1;row_2
city;Leeds;York
score;7;

Tips and best practices

  • Keep a readable identifier in the source data. Generated names row_1 and row_2 reflect positions and cannot by themselves identify records reliably after subsequent reordering.
  • Check the receiving application’s column limit. A browser-readable input can become too wide for a spreadsheet or simply too cumbersome for useful visual comparison.
  • Retain the original file. Transposing the result again does not automatically restore its schema because field and the generated row_n headings are now part of the table.

Frequently asked questions

Does the first column become the output header?

No. The tool generates field for original headings and row_1, row_2 for source records. First-column values remain data. Rename the generated columns afterwards if you need meaningful product or person names as headings.

How is this different from Unpivot?

Unpivot repeats identifiers and unfolds selected columns into variable/value pairs. Transpose reorients the whole table. Monthly sales with a product identifier usually need Unpivot; displaying a few product records side by side is a more suitable transposition use case.

Are Excel formulas and formatting retained?

No. Transformation works on read values, not a complete workbook layout. Macros, styles and formula references are not rewritten for their new positions. Recalculate and inspect the workbook before importing when exported values depend on spreadsheet formulas.

Why is the result so wide?

Every source record becomes a column. Ten thousand records therefore create ten thousand data columns plus field. Reduce the input first if you want visual comparison or if the receiving application supports fewer columns than the transformed result requires.

Related tools

Tools similar or complementary to this one.

Works well with

Convert Excel, CSV, and other spreadsheet formats directly in your browser.

Data & spreadsheetsFeaturedUse this tool

Select the CSV columns you want to keep in the final result.

Data & spreadsheetsUse this tool