CSV Unpivot
Unpivot selected CSV columns into attribute and value rows, retain identifiers and choose whether to keep empty values.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Turn selected wide CSV columns into attribute and value rows while repeating the remaining identifier cells without aggregation.
How to use it
- 1Paste or open a CSV and read its columns.
- 2Select measurement columns, name the new pair of headers and choose whether to skip empty values.
- 3Review the expanded rows and download or copy the long CSV.
Example
- Input
- id,Jan,Feb 001,10,20
- Output
- id,attribute,value 001,Jan,10 001,Feb,20
Select Jan and Feb as value columns. The ID repeats once for each selected measurement; numbers remain text.
What happens to your data
The reshape runs locally. Your table and generated CSV are not uploaded for processing; optional usage counts omit its values and headers.
Last updated November 2026
Convert a wide CSV table to long rows without opening a spreadsheet. CSV Unpivot, also called CSV melt or wide-to-long conversion, turns selected headings such as Jan and Feb into values in an attribute column. Their cells become a second value column, while the columns you leave unchecked repeat as identifiers.
How it works
The tool reads a strict table with a named header. Select the measurement columns that should become rows, and choose distinct names for the new attribute and value headers. The remaining identifier columns keep their original order. For each source record, one output record is produced for each selected value column. A row with ID 001, Jan 10 and Feb 20 becomes two rows: 001/Jan/10 and 001/Feb/20. This preserves each measurement rather than aggregating it.
Value columns are processed in their selected order; the interface presents them in source-column order. Every original scalar remains text, including leading zeros, long numeric IDs and multiline fields. Empty strings are retained by default. The optional skip-empty choice removes only exactly empty values; spaces and the text null remain values. The result reports skipped cells and output records. Selecting all source columns is allowed and produces only the attribute and value columns.
Output headers cannot repeat each other or any retained identifier header. The tool checks the number of expanded rows and cells before building the output. It stops when the result would exceed its limits. CSV Transpose swaps a whole grid; unpivot instead repeats identifiers while collecting measurements into a consistent pair of columns. CSV Pivot performs the opposite kind of reshape with grouping and optional aggregation; a pivot cannot always reconstruct the original source after information has been aggregated.
Use UTF-8 input up to 500 KiB, 10,000 records including the header, 128 columns and 200,000 cells. The output is limited to 2 MiB, 10,000 records including its header and 200,000 cells. Comma, semicolon and tab delimiters are supported; choose the correct delimiter explicitly. Each header must be nonempty and unique. Invalid quotes or unequal record widths stop processing instead of silently repairing the table.
CSV output uses UTF-8 without a byte order mark and CRLF record endings. Quoting may be rewritten while logical cell text is preserved. Formula-like text is not prefixed or removed automatically; spreadsheet applications can interpret such text as formulas, so review the file and import columns as text where appropriate. The downloadable JSON report records operations and counts rather than original cell values. Processing happens in this browser tab.
Worked example: Turn monthly columns into measurement rows
- Input
- id,Jan,Feb 001,10,20
- Result
- id,attribute,value 001,Jan,10 001,Feb,20
Select Jan and Feb as value columns. The ID repeats once for each selected measurement; numbers remain text.
Common use cases
- Turn Jan–Dec columns into month and amount rows for a chart.
- Prepare a wide survey export for scripts that expect one measurement per row.
- Retain all identifier columns while collecting selected metrics.
- Keep or deliberately skip blank measurements before a CSV pivot or import.
Frequently asked questions
How is CSV unpivot different from transpose?+
Transpose swaps every row and column. Unpivot repeats chosen identifier values and converts selected measure headers into attribute values, creating one row per selected measurement.
Are blank values removed?+
They are kept by default. The skip-empty checkbox removes only zero-length cell values. A space or the literal text null is not empty.
Does it add or average the numbers?+
It does not aggregate. Every selected cell becomes its own text value in an output row. Use CSV Pivot when you need grouped counts or sums.
Can I keep more than one identifier?+
Yes. Leave every identifier column unchecked. Their values repeat together for each selected measure.
Why did a small source exceed the output limit?+
Unpivot expands rows. With 1,000 source rows and 12 selected value columns, the result would contain 12,000 data rows before any empty-value skips. This tool allows at most 9,999 data rows plus the header.
Standards and limitations
Related tools
CSV Value Mapper
Replace exact CSV cell values using a two-column lookup, retain unmatched values and download an audit of counts locally.
JSON Array Splitter
Split a JSON array into fixed-size batches, preserving value spelling and source order. Download all JSON files and a manifest in one ZIP.
CSV to XML
Convert CSV to XML with original headers, leading zeros and empty strings preserved.
XML to CSV
Convert a selected XML record path to CSV, keeping attributes, namespaces and repeated fields.