ConvertCSV

Browser-based CSV transform

Unpivot CSV

Melt wide columns into rows with a variable column and a value column. Everything runs locally in your browser — paste CSV, set options, preview, then copy or download.

Input

Paste CSV or upload a file

Options

Configure how this transform runs

Output Preview

Transformed CSV

Run the transform to preview CSV output here.

Unpivot CSV

Unpivoting does the opposite of a pivot. It takes columns that each hold one measurement, such as one column per month, and stacks them into rows: a variable column records which old header a value came from, and a value column records the cell. Databases, charting libraries, and group-by queries generally expect that long layout, so a wide spreadsheet export often needs this step before it can be loaded.

Name the identifier columns that must stay on every row, then optionally rename the new variable and value columns. Every remaining column is melted into the long output.

Key features

  • Several identifier columns carried onto every output row
  • Custom names for the variable and value columns
  • Empty cells kept so each record shows the full set of columns
  • Error when no column is left to melt

About the wide CSV to long CSV format

For each input record the output contains one row per melted column. The header is the identifier columns in their original order, followed by the variable column (default name variable) and the value column (default name value). Melted columns keep their left-to-right order, so a record with months Jan through Mar produces its Jan row, then its Feb row, then its Mar row.

Empty cells are not dropped. A blank month becomes a row with an empty value, which keeps the output a complete grid of records by columns.

How it works

For every record the tool copies the identifier values, then writes one output row for each remaining column. The header text goes into the variable column and the cell text goes into the value column.

Common use cases

  • Turning a budget sheet with one column per month into one row per month for a database load.
  • Preparing a wide sensor export so a line chart can group the readings by sensor name.
  • Converting a store-by-weekday sales matrix into a flat table that can be filtered.
  • Reshaping test results where every test is its own column into a row per test run.

How to use this tool

  1. Paste the wide table, or upload it, with one record per row and one measurement per column.
  2. Type the identifier columns to keep, separated by commas, for example product.
  3. Optionally change the variable and value column names. Leaving them blank gives variable and value.
  4. Click Transform, confirm the row count is records multiplied by melted columns, then download.

Example

Input (wide CSV, two records)

product,jan,feb,mar
Widgets,40,52,
Gears,15,0,22

Output (ID product, names month and units)

product,month,units
Widgets,jan,40
Widgets,feb,52
Widgets,mar,
Gears,jan,15
Gears,feb,0
Gears,mar,22

Tips for best results

  • List only true identifiers, such as product, store, or account, as ID columns. Every other column is melted, including notes or total columns you may not want as values.
  • Name the variable column after what the headers mean, such as month or question, rather than keeping the default.
  • Remove a Total column before unpivoting. Otherwise the totals become one more value row per record and get charted as if they were a month.

Common errors and how to fix them

Enter at least one ID column to keep.
The identifier box was empty. Unpivot needs at least one column to repeat on each output row, so name the column that identifies a record.
Every column is an ID column, so there is nothing to melt into rows.
The ID list covers the whole header. Remove the columns that should become values from the ID list.
The variable and value column names must differ from each other and from the ID columns.
The new name collides with an identifier, for example naming the variable column product while product is an ID. Choose a different name.

Frequently asked questions

What happens to date headers such as 2026-01?

Each header is written into the variable column exactly as it appears. The tool does not parse dates, so reformat that column afterwards if a tool downstream needs real dates.

How is this different from Transpose?

Transpose swaps rows and columns, so the record count and the column count trade places. Unpivot keeps one output row per combination of record and melted column, which multiplies the row count.

For more background on data formats and conversion workflows, read our format guides.