Diysb Tools

Transpose CSV

Just upload your CSV file in the form below, and this tool will automatically transpose your CSV. In the tool options, you can specify the character that starts the comment lines in the CSV to remove them. Additionally, if the CSV is incomplete (missing values), you can replace missing values with the empty character or a custom character.

CSV Tools

What is a Transpose CSV?

This tool transposes Comma Separated Values (CSV). It treats the CSV as a matrix of data and flips all elements across the main diagonal. The output contains the same CSV data as the input, but now all the rows have become columns, and all the columns have become rows. After transposition, the CSV file will have opposite dimensions. For example, if the input file has 4 columns and 3 rows, the output file will have 3 columns and 4 rows. During conversion, the program also cleans the data from unnecessary lines and corrects incomplete data. Specifically, the tool automatically deletes all empty records and comments that begin with a specific character, which you can set in the option. Additionally, in cases where the CSV data is corrupted or lost, the utility completes the file with empty fields or custom fields that can be specified in the options. Csv-abulous!

Input CSV
Transposed CSV
Tool options
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

Transpose CSV Examples

Transpose a 2x3 CSV

This example transposes a CSV with 2 rows and 3 columns. The tool splits the input data by the comma character, creating a 2 by 3 matrix. It then exchanges elements, turning columns into rows and vice versa. The output is a transposed CSV with flipped dimensions

foo,bar,baz val1,val2,val3
foo,bar,baz val1,val2,val3
foo,val1 bar,val2 baz,val3
foo,val1 bar,val2 baz,val3
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

Transpose a Long CSV

In this example, we flip a vertical single-column CSV file containing a list of our favorite fruits and their emojis. This single column is transformed into a single-row CSV file and the rows length matches the height of the original CSV.

Tasty Fruit ๐Ÿ‘ peaches ๐Ÿ’ cherries ๐Ÿฅ kiwis ๐Ÿ“ strawberries ๐ŸŽ apples ๐Ÿ pears ๐Ÿฅญ mangos ๐Ÿ pineapples ๐ŸŒ bananas ๐ŸŠ tangerines ๐Ÿ‰ watermelons ๐Ÿ‡ grapes
Tasty Fruit ๐Ÿ‘ peaches ๐Ÿ’ cherries ๐Ÿฅ kiwis ๐Ÿ“ strawberries ๐ŸŽ apples ๐Ÿ pears ๐Ÿฅญ mangos ๐Ÿ pineapples ๐ŸŒ bananas ๐ŸŠ tangerines ๐Ÿ‰ watermelons ๐Ÿ‡ grapes
fTasty Fruit,๐Ÿ‘ peaches,๐Ÿ’ cherries,๐Ÿฅ kiwis,๐Ÿ“ strawberries,๐ŸŽ apples,๐Ÿ pears,๐Ÿฅญ mangos,๐Ÿ pineapples,๐ŸŒ bananas,๐ŸŠ tangerines,๐Ÿ‰ watermelons,๐Ÿ‡ grapes
fTasty Fruit,๐Ÿ‘ peaches,๐Ÿ’ cherries,๐Ÿฅ kiwis,๐Ÿ“ strawberries,๐ŸŽ apples,๐Ÿ pears,๐Ÿฅญ mangos,๐Ÿ pineapples,๐ŸŒ bananas,๐ŸŠ tangerines,๐Ÿ‰ watermelons,๐Ÿ‡ grapes
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

Clean and Transpose CSV Data

In this example, we perform three tasks simultaneously: transpose a CSV file, remove comments and empty lines, and fix missing data. The transposition operation is the same as flipping a matrix across its diagonal and it is done automatically by the program. Additionally, the program automatically removes all empty lines as they cannot be transposed. The comments are removed by specifying the "#" symbol in the options. The program also fixes missing data using a custom bullet symbol "โ€ข", which is specified in the options.

Fish Type,Color,Habitat Goldfish,Gold,Freshwater #Clownfish,Orange,Coral Reefs Tuna,Silver,Saltwater Shark,Grey,Saltwater Salmon,Silver
Fish Type,Color,Habitat Goldfish,Gold,Freshwater #Clownfish,Orange,Coral Reefs Tuna,Silver,Saltwater Shark,Grey,Saltwater Salmon,Silver
Fish Type,Goldfish,Tuna,Shark,Salmon Color,Gold,Silver,Grey,Silver Habitat,Freshwater,Saltwater,Saltwater,โ€ข
Fish Type,Goldfish,Tuna,Shark,Salmon Color,Gold,Silver,Grey,Silver Habitat,Freshwater,Saltwater,Saltwater,โ€ข
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

Enter the character used to fill missing values.