Diysb Tools

Change CSV Separator

Change the delimiter/separator in CSV files. Convert between different CSV formats like comma, semicolon, tab, or custom separators.

CSV Tools

What is a Change CSV Separator?

Change the delimiter/separator in CSV files. Convert between different CSV formats like comma, semicolon, tab, or custom separators.

Input CSV
Output CSV
Tool options
Adjust 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.
Remove empty lines from CSV input file.
Output options
Enter the character used to delimit columns in the CSV output file.
Wrap all fields of the output CSV file in quotes
Change CSV Separator Examples

Change the CSV Delimiter to a Semicolon

In this example, we change the column separator to the semicolon separator in a CSV file containing data about countries, their populations, and population densities. As you can see, the input CSV file uses the standard commas as separators. After specifying this delimiter in the source CSV options, we set a new CSV delimiter for the output file to a semicolon, resulting in a new CSV file that now uses semicolons ";" in the output. Such CSV files with semicolons are called SSV files (semicolon-separated values files)

country,population,density China,1412,152 India,1408,428 United States,331,37 Indonesia,273,145 Pakistan,231,232 Brazil,214,26
country,population,density China,1412,152 India,1408,428 United States,331,37 Indonesia,273,145 Pakistan,231,232 Brazil,214,26
country;population;density China;1412;152 India;1408;428 United States;331;37 Indonesia;273;145 Pakistan;231;232 Brazil;214;26
country;population;density China;1412;152 India;1408;428 United States;331;37 Indonesia;273;145 Pakistan;231;232 Brazil;214;26
Adjust 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.
Remove empty lines from CSV input file.
Output options
Enter the character used to delimit columns in the CSV output file.
Wrap all fields of the output CSV file in quotes

Restore a CSV File to the Standard Format

In this example, a data scientist working with flowers was given an unusual CSV file that uses the vertical bar symbol as the field separator (such files are called PSV files – pipe-separated values files). To transform the file back to the standard comma-separated values (CSV) file, in the options, she set the input delimiter to "|" and the new delimiter to ",". She also wrapped the output fields in single quotes, enabled the option to remove empty lines from the input, and discarded comment lines starting with the "#" symbol.

species|height|days|temperature Sunflower|50cm|30|25°C Rose|40cm|25|22°C Tulip|35cm|20|18°C Daffodil|30cm|15|20°C Lily|45cm|28|23°C #pumpkin Brazil,214,26
species|height|days|temperature Sunflower|50cm|30|25°C Rose|40cm|25|22°C Tulip|35cm|20|18°C Daffodil|30cm|15|20°C Lily|45cm|28|23°C #pumpkin Brazil,214,26
'species','height','days','temperature' 'Sunflower','50cm','30','25°C' 'Rose','40cm','25','22°C' 'Tulip','35cm','20','18°C' 'Daffodil','30cm','15','20°C' 'Lily','45cm','28','23°C'
'species','height','days','temperature' 'Sunflower','50cm','30','25°C' 'Rose','40cm','25','22°C' 'Tulip','35cm','20','18°C' 'Daffodil','30cm','15','20°C' 'Lily','45cm','28','23°C'
Adjust 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.
Remove empty lines from CSV input file.
Output options
Enter the character used to delimit columns in the CSV output file.
Wrap all fields of the output CSV file in quotes
Enter the quote character used to quote the CSV output fields.

Plants vs. Zombies CSV

In this example, we import CSV data with zombie characters from the game Plants vs. Zombies. The data includes zombies names, the level at which they first appear in the game, their health, damage, and speed. The data follows the standard CSV format, with commas serving as field separators. To change the readability of the file, we replace the usual comma delimiter with a slash symbol, creating a slash-separated values file.

zombie_name,first_seen,health,damage,speed Normal Zombie,Level 1-1,181,100,4.7 Conehead Zombie,Level 1-3,551,100,4.7 Buckethead Zombi,Level 1-8,1281,100,4.7 Newspaper Zombie,Level 2-1,331,100,4.7 Football Zombie,Level 2-6,1581,100,2.5 Dancing Zombie,Level 2-8,335,100,1.5 Zomboni,Level 3-6,1151,Instant-kill,varies Catapult Zombie,Level 5-6,651,75,2.5 Gargantuar,Level 5-8,3000,Instant-kill,4.7
zombie_name,first_seen,health,damage,speed Normal Zombie,Level 1-1,181,100,4.7 Conehead Zombie,Level 1-3,551,100,4.7 Buckethead Zombi,Level 1-8,1281,100,4.7 Newspaper Zombie,Level 2-1,331,100,4.7 Football Zombie,Level 2-6,1581,100,2.5 Dancing Zombie,Level 2-8,335,100,1.5 Zomboni,Level 3-6,1151,Instant-kill,varies Catapult Zombie,Level 5-6,651,75,2.5 Gargantuar,Level 5-8,3000,Instant-kill,4.7
zombie_name/first_seen/health/damage/speed Normal Zombie/Level 1-1/181/100/4.7 Conehead Zombie/Level 1-3/551/100/4.7 Buckethead Zombi/Level 1-8/1281/100/4.7 Newspaper Zombie/Level 2-1/331/100/4.7 Football Zombie/Level 2-6/1581/100/2.5 Dancing Zombie/Level 2-8/335/100/1.5 Zomboni/Level 3-6/1151/Instant-kill/varies Catapult Zombie/Level 5-6/651/75/2.5 Gargantuar/Level 5-8/3000/Instant-kill/4.7
zombie_name/first_seen/health/damage/speed Normal Zombie/Level 1-1/181/100/4.7 Conehead Zombie/Level 1-3/551/100/4.7 Buckethead Zombi/Level 1-8/1281/100/4.7 Newspaper Zombie/Level 2-1/331/100/4.7 Football Zombie/Level 2-6/1581/100/2.5 Dancing Zombie/Level 2-8/335/100/1.5 Zomboni/Level 3-6/1151/Instant-kill/varies Catapult Zombie/Level 5-6/651/75/2.5 Gargantuar/Level 5-8/3000/Instant-kill/4.7
Adjust 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.
Remove empty lines from CSV input file.
Output options
Enter the character used to delimit columns in the CSV output file.
Wrap all fields of the output CSV file in quotes