Text

Runs in your browser. No file uploads for processing.

CSV Unpivot: Convert Wide Tables to Long Format

Turn wide CSV or TSV columns into long-format rows while keeping identifier columns like store, SKU or region.

Loading tool...

How to turn wide CSV columns into long rows

  1. Read the headers

    Choose or paste a rectangular UTF-8 file with one header row. Pick comma, tab or semicolon to match the file.

  2. Keep the columns that identify each record

    Load the example and keep Store and SKU. This repeats North and 001 while Jan and Feb become values in a new Month column. The zero stays zero, and the empty South January value stays empty unless you skip blanks.

  3. Review the result before downloading

    Preview the row count and download a comma-separated CSV. The new rows keep the source record order, then the source column order. Formula protection prefixes spreadsheet formula-like text by default.

Use cases

  • Reshape a monthly sales or inventory export for a chart or a dashboard.
  • Prepare survey or lab measurement columns as long-format records for a database or notebook.

Limits and privacy

  • One UTF-8 input up to 2 MiB and 2,000,000 characters, 100 columns and 20,000 records including the header. At most 25,000 output data rows or 8 MiB.
  • Headers must be unique; rows must be rectangular. This does not transpose a whole table, group or aggregate values, or read XLSX files. Export those as CSV first.

The tool processes inputs in your browser. Account features and usage analytics are separate.

Frequently asked questions

How can I keep or reorder only certain columns before reshaping?

Use CSV Column Extractor first to select and reorder the columns you need, then unpivot that smaller table.

What is the difference between unpivoting and transposing?

Unpivoting repeats identifier fields and stacks the other columns as name-and-value pairs. Transposing swaps every row and every column without keeping identifier fields in place.

Will blank cells, zeros or IDs lose their values?

Empty cells stay unless you enable Skip empty cells; 0 and spaces are not empty. Leading zeros stay in the CSV bytes. If a spreadsheet drops those zeros when opening the file, import that column as text.

Can this combine or sum repeated IDs?

No. Every source record is processed separately in its original order, even if two records have the same identifiers. There is no grouping or calculation.

Does it upload the file?

No. The file is read and reshaped in your browser. Review the download before sharing because retained identifiers or measurements can be sensitive.

Related tools