CSV unpivot
Open CSV unpivot on Happytails.ai. This view has the same page content and links, with explicit tool capabilities. Read the processing notes before using a tool.
Tool capabilities
{
"id": "csv-unpivot",
"category": "data-tools",
"built": true,
"requirements": "List the measure columns to unpivot, such as Jan,Feb. Each selected cell becomes a record containing the original identifier fields, the measure's column name and its value. Every unselected column remains an identifier. Results follow source-record order and then your selected measure-column order. Empty values are retained by default. Omit empty measure cells if you do not need those records; zero and spaces are still preserved. You can name the new variable and value columns. Their names must be distinct and must not overwrite a retained column. Quote a measure-column name containing a comma. Review the table, then download the complete CSV and JSON processing report. Values remain strings rather than being converted to numbers or dates. The default export prefixes formula-like cells with an apostrophe. Use original-string export for trusted machine processing and import CSV columns as text when exact identifiers matter.",
"implementation": {
"fields": [
{
"key": "delimiter",
"label": "Input CSV separator",
"value": ",",
"type": "select",
"values": [
",",
";",
"\t"
]
},
{
"key": "columns",
"label": "Measure columns",
"value": "Jan,Feb",
"type": "text",
"help": "One comma-separated CSV record of exact column names. Quote a name that contains a comma. All unselected columns remain identifiers."
},
{
"key": "variableColumn",
"label": "New variable column",
"value": "variable",
"type": "text"
},
{
"key": "valueColumn",
"label": "New value column",
"value": "value",
"type": "text"
},
{
"key": "dropEmpty",
"label": "Omit empty measure cells",
"value": false,
"type": "checkbox"
},
{
"key": "exportMode",
"label": "Spreadsheet formula handling",
"value": "Protect formulas",
"type": "select",
"values": [
"Protect formulas",
"Preserve original cells"
]
}
],
"live": true,
"presentation": "metrics",
"note": "Turn selected measure columns into variable/value records. Identifier columns and cell strings are preserved. Results follow source-record order, then your selected column order. Use a header row with unique column names. Up to 1,000,000 input characters, 10,000 data records, 100 columns and 100,000 cells. Strings and spaces are preserved. Output CSV uses commas and quotes every cell. Protect formulas prefixes risky output cells with an apostrophe; choose Preserve original cells only for trusted machine processing. Runs on your device.",
"experience": {
"automatic": true,
"single": false,
"inputMaxLength": 1000000,
"inputMode": "text",
"label": "CSV",
"placeholder": "name,score\nAda,98\nSam,92",
"help": "Include a header row. Quote cells that contain commas or new lines. Results update as you type. Up to 1,000,000 characters.",
"helpParts": [
"Include a header row. Quote cells that contain commas or new lines.",
"Results update as you type.",
"Up to 1,000,000 characters."
],
"action": null
},
"mode": "automatic",
"interactive": false
},
"execution": "Browser interface",
"api": null,
"browser_agent": {
"supported": true,
"name": "run_current_tool",
"discovery": "WebMCP on the human page in a supporting browser",
"verification": "See audit/API-AUDIT.md; availability is not verification"
}
}Page guide
Convert a wide CSV into tidy long-form records. Turn measure columns into a variable and value while keeping identifiers.
How to use CSV unpivot
- Paste the wide CSV and choose its input separator.
- List the exact measure-column names and choose the two new column names.
- Review the long-form records and download the CSV.
Useful next steps
What to expect
Convert a wide CSV into tidy long-form records. Turn measure columns into a variable and value while keeping identifiers. List the measure columns to unpivot, such as Jan,Feb. Each selected cell becomes a record containing the original identifier fields, the measure's column name and its value. Every unselected column remains an identifier. Results follow source-record order and then your selected measure-column order. Empty values are retained by default. Omit empty measure cells if you do not need those records; zero and spaces are still preserved. You can name the new variable and value columns. Their names must be distinct and must not overwrite a retained column. Quote a measure-column name containing a comma. Review the table, then download the complete CSV and JSON processing report. Values remain strings rather than being converted to numbers or dates. The default export prefixes formula-like cells with an apostrophe. Use original-string export for trusted machine processing and import CSV columns as text when exact identifiers matter.
Try a small example
id,Jan,Feb 001,2,3 002,0,