Diysb Tools

Insert CSV columns

Add new columns to CSV data at specified positions.

CSV Tools

Insert CSV Columns

This tool allows you to insert new columns into CSV data at specified positions. You can prepend, append, or insert columns at custom positions based on header names or column numbers.

Input CSV
Output CSV
Tool options
CSV to insert
Enter one or more columns you want to insert into the CSV. the character used to delimit columns has to be the same with the one in the CSV input file. Ps: Blank lines will be ignored
CSV 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. Lines starting with this symbol will be skipped.

If the input CSV file is incomplete (missing values), then add empty fields or custom symbols to records to make a well-formed CSV?

Position Options

Specify where to insert the columns in the CSV file.

Insert CSV columns Examples

Insert a single column by position

In this example, we insert a single column "city" at position 1 in the CSV data. The input CSV has data about cars, including the "Brand" and "Model" of the car. We now add a "city" column at position 1. To do this, we enter the city data in the comma-separated format in the "New Column" option, and to quickly add the new column at position 1, then we specify the position number.

Brand,Model Toyota,Camry Ford,Mustang Honda,Accord Chevrolet,Malibu
Brand,Model Toyota,Camry Ford,Mustang Honda,Accord Chevrolet,Malibu
city,Brand,Model dallas,Toyota,Camry houston,Ford,Mustang dallas,Honda,Accord houston,Chevrolet,Malibu
city,Brand,Model dallas,Toyota,Camry houston,Ford,Mustang dallas,Honda,Accord houston,Chevrolet,Malibu
CSV to insert
Enter one or more columns you want to insert into the CSV. the character used to delimit columns has to be the same with the one in the CSV input file. Ps: Blank lines will be ignored
CSV 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. Lines starting with this symbol will be skipped.

If the input CSV file is incomplete (missing values), then add empty fields or custom symbols to records to make a well-formed CSV?

Use this custom value to fill in missing fields. (Works only with "Custom Values" mode above.)
Position Options

Specify where to insert the columns in the CSV file.

Select the method to insert the columns in the CSV file.

Number of the column you want to insert columns after.

Append Multiple columns by header Name

In this example, we append two data columns to the end of CSV data. The input CSV has data about cars, including the "Brand" and "Model" of the car. We now add two more columns at the end: "Year" and "Price". To do this, we enter these two data columns in the comma-separated format in the "New Column" option, and to quickly add the new columns to the end of the CSV, then we specify the name of the header they should be put after.

Brand,Model Toyota,Camry Ford,Mustang Honda,Accord Chevrolet,Malibu
Brand,Model Toyota,Camry Ford,Mustang Honda,Accord Chevrolet,Malibu
Brand,Model,Year,Price Toyota,Camry,2022,25000 Ford,Mustang,2021,35000 Honda,Accord,2022,27000 Chevrolet,Malibu,2021,28000
Brand,Model,Year,Price Toyota,Camry,2022,25000 Ford,Mustang,2021,35000 Honda,Accord,2022,27000 Chevrolet,Malibu,2021,28000
CSV to insert
Enter one or more columns you want to insert into the CSV. the character used to delimit columns has to be the same with the one in the CSV input file. Ps: Blank lines will be ignored
CSV 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. Lines starting with this symbol will be skipped.

If the input CSV file is incomplete (missing values), then add empty fields or custom symbols to records to make a well-formed CSV?

Position Options

Specify where to insert the columns in the CSV file.

Select the method to insert the columns in the CSV file.

Header of the column you want to insert columns after.

Append Multiple columns

In this example, we append two data columns to the end of CSV data. The input CSV has data about cars, including the "Brand" and "Model" of the car. We now add two more columns at the end: "Year" and "Price". To do this, we enter these two data columns in the comma-separated format in the "New Column" option, and to quickly add the new columns to the end of the CSV, then we select append.

Brand,Model Toyota,Camry Ford,Mustang Honda,Accord Chevrolet,Malibu
Brand,Model Toyota,Camry Ford,Mustang Honda,Accord Chevrolet,Malibu
Brand,Model,Year,Price Toyota,Camry,2022,25000 Ford,Mustang,2021,35000 Honda,Accord,2022,27000 Chevrolet,Malibu,2021,28000
Brand,Model,Year,Price Toyota,Camry,2022,25000 Ford,Mustang,2021,35000 Honda,Accord,2022,27000 Chevrolet,Malibu,2021,28000
CSV to insert
Enter one or more columns you want to insert into the CSV. the character used to delimit columns has to be the same with the one in the CSV input file. Ps: Blank lines will be ignored
CSV 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. Lines starting with this symbol will be skipped.

If the input CSV file is incomplete (missing values), then add empty fields or custom symbols to records to make a well-formed CSV?

Position Options

Specify where to insert the columns in the CSV file.