Dataset Unpivot Tool

Turn a wide table into a long one by repeating the identifier columns and moving chosen value columns into rows.

Files stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Unpivot dataset controls

Drop your CSV file here

or choose one from your device

One UTF-8 CSV or TSV file. Use either this or the pasted text, not both.

    Paste the wide table, or leave this empty and choose a file. Values are kept exactly as they appear in the text.

    Without a names row, columns are addressed by their 1-based position such as 2.

    The columns to repeat on every output row, such as region,year. Leave empty to unpivot the whole table.

    The columns to turn into rows, such as jan,feb,mar. Leave empty to use every column that is not an identifier.

    This column holds the heading of the source column each value came from.

    A blank cell becomes no output row instead of a row holding an empty value. Turn this off to keep one row per field.

    A cell whose first visible character is = + - or @ receives an apostrophe, so a spreadsheet reads it as text. The prefix changes the stored value.

    How to use Dataset Unpivot Tool

    1. Paste the wide table or choose a CSV file with one row per subject and one column per measurement.
    2. List the identifier columns to repeat, such as region and year.
    3. List the value columns to turn into rows, or leave the list empty to use every column that is not an identifier.
    4. Name the two new columns, press Unpivot dataset, and download the long table.

    Example: Dataset Unpivot Tool

    Turn monthly figures into one row per region and month.

    You add
    Pasted text region,jan,feb with the rows EU,10,20 and US,30, (an empty February). Identifier columns: region. Value columns: jan,feb. Name column heading: variable. Value column heading: value. Leave out empty value cells: on.
    You get
    The page reports three rows, lists the columns region, variable and value, and the download holds region,variable,value then EU,jan,10, EU,feb,20 and US,jan,30. The empty February cell produced no row.

    Options

    Identifier columns
    These columns are copied onto every output row, so the row still says which subject the value belongs to. Leave the list empty to unpivot the whole table into pairs of a name and a value.
    Value columns
    One output row is written for each listed column, in the order you list them. Leaving the list empty uses every column that is not an identifier, in the order the table already has them.
    Leave out empty value cells
    On by default, so a blank measurement produces no row at all. Turn it off when a row per field matters more than a compact result, and blanks are written as empty values.

    Supported inputs and limits

    Paste up to 20,000,000 characters or choose one UTF-8 CSV or TSV file up to 20 MiB, with 100,000 rows and 500 columns of input. The result may hold up to 100,000 rows and about 2,000,000 cells in total, so a very wide table needs fewer value columns. A column named as an identifier and as a value column is refused, and the two new headings must differ from each other and from every identifier column. Reading uses the delimiter you choose, and the download is comma separated unless another delimiter was chosen for input.

    Where your input is processed

    This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

    Reading a long table next to the wide one

    A wide table is easy to read across and awkward for a pivot table or a chart, because each month is its own column. The long shape puts the month in a name column and the number in a value column, so grouping, filtering and charting treat every month the same way.

    Questions about Dataset Unpivot Tool

    What does unpivoting actually change?

    Each value column becomes a row of its own. The identifier values are copied onto that row, the source heading is written into the name column, and the cell itself goes into the value column.

    Why is one region missing from my result?

    The default leaves out rows whose value cell is blank. Turn off Leave out empty value cells and that region appears again with an empty value.

    Which order do the rows come in?

    Source rows keep their order. Explicit value columns follow the order you list them; when the list is empty, the remaining columns follow source-table order.

    Does my table leave my computer?

    It does not. The rows are read and reshaped inside this page, and the CSV you download is created from that same data on your device.

    Project manager: Tony Hines · Content updated 4 October 2026 · Report a problem