Text

Runs in your browser. No file uploads for processing.

CSV Pivot: Convert Long Tables to Wide Format

Turn long-format CSV or TSV records into a wide table without adding, averaging or silently overwriting values.

Loading tool...

How to convert long-format CSV to a wide table

  1. Open a long table

    Choose or paste a rectangular UTF-8 CSV or TSV with a header. The sample has Store, SKU, Month and Stock columns.

  2. Choose what identifies a row and what creates columns

    Keep Store and SKU. Use Month to create columns and Stock for values. In the example, North / 001 becomes one row with Jan = 0 and Feb = 12. The missing South January cell stays blank.

  3. Check conflicts, then download

    If two records target the same ID and category, the report names both record numbers and stops. Resolve the conflict or choose another identifying column, then preview and download your CSV.

Use cases

  • Reshape stock readings recorded by month into a wide export for a spreadsheet or a legacy import.
  • Check whether survey or product measurements are unique before laying them out as categories across a row.

Limits and privacy

  • One UTF-8 file up to 2 MiB, 2,000,000 characters, 100 columns and 20,000 records including headers. Output is limited to 100 columns, 200,000 data cells or 8 MiB.
  • For a rectangular long table, not XLSX files, an interactive PivotTable or an aggregation engine. Missing cells and existing empty values both appear blank in a CSV.

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

Frequently asked questions

Can I turn the new headers back into rows?

Use CSV Unpivot to keep the same identifiers and stack the new columns into name-and-value rows. If you skip blanks, you also skip any blank values that already existed.

Why does this stop when two records target the same cell?

A wide table has only one cell for each ID combination and category. The tool does not sum, average, pick one value or discard duplicates. It identifies the conflicting records so you can decide how to resolve them.

Will it preserve leading zeros or change text and dates?

The tool does not interpret dates, IDs or numbers. Leading zeros stay in the file bytes. Default spreadsheet formula protection prefixes formula-like text. Import ID columns as text if your spreadsheet still converts them.

How are the new rows and columns ordered?

Rows follow the first appearance of a chosen ID combination. New columns follow the first appearance of each category. Empty categories and names that conflict with another output header are rejected.

Does it send the records to a server?

No. The browser reads and reshapes the local file or pasted text. Review the download before sharing; identifiers or measurements may still be sensitive.

Related tools