Wide to Long Format Converter

Transform data between wide and long formats with interactive column selection

Input Data

Help

Wide vs Long Format

Wide Format: Data where each variable is in a separate column.

ID, Name, Q1_2023, Q2_2023, Q3_2023
1, Alice, 100, 150, 200
2, Bob, 120, 140, 180

Long Format: Data where observations are in separate rows.

ID, Name, Quarter, Sales
1, Alice, Q1_2023, 100
1, Alice, Q2_2023, 150
1, Alice, Q3_2023, 200
2, Bob, Q1_2023, 120
2, Bob, Q2_2023, 140
2, Bob, Q3_2023, 180
When to Use Wide Format
  • Human-readable reports and tables
  • Spreadsheet analysis
  • Matrix operations
  • Cross-tabulations
When to Use Long Format
  • Statistical analysis (required by many R packages)
  • Database storage
  • Visualization libraries (ggplot2, Plotly)
  • Machine learning pipelines
  • Time series analysis
How to Use
  1. Paste your wide-format CSV data (with headers)
  2. Click "Parse Data" to analyze the structure
  3. Select ID columns (columns to keep fixed)
  4. Select value columns (columns to pivot into rows)
  5. Specify names for the variable and value columns
  6. Click "Convert to Long Format"
  7. Download or copy the result
Example Use Cases
  • Sales Data: Convert quarterly sales by product into time series format
  • Survey Results: Transform multiple question columns into question-answer pairs
  • Experimental Data: Convert treatment columns into treatment-result pairs
  • Financial Data: Transform multiple year columns into year-value pairs