Our Network


Coming Soon


Coming Later

CSV Column Inserter

World's Simplest CSV Tool

Free online CSV column inserter. Just upload your CSV file in the form below, paste the new column in the options, and it will automatically get inserted in your CSV. In the tool options, you can also specify more than one column to insert, set the insertion position, and optionally skip the empty and comment lines. Created by programmers from team Browserling.

᠎᠎᠎          Tool Options

New Column to Insert

Enter one or more columns you
want to insert into the CSV.
For example:

animal,fur,legs
horse,yes,4
dolphin,no,0
spider,no,8
human,no,2

New Column Position

Specify the column number
after which to insert the new
one (starting from 0).
Specify the column name after
which to insert the new one.
If the specified column name
appears more than once in
CSV, then add the new column
after each such column.

Incomplete Values

Choose what to do if a column
or row is not completely
filled with values.
If you used "Set Custom Values",
then enter a custom value here
to fill in all empty CSV fields.

CSV Cleaning

Specify the symbol that starts
the comment line.
Don't output empty lines.

What Is a CSV Column Inserter?

This tool inserts one more new column into an existing CSV file at a specified position. It takes a comma-separated values (CSV) file as input and adds a new column (or multiple columns) with new values to the file. The new columns should have a vertical structure and consist of the same number of rows vertically as the input CSV. For example, if the input CSV has a header row and 200 data rows (total of 201 rows), then the new column should also have a header row and 200 data rows (also total of 201 rows). To add multiple columns at once, you can specify several CSV fields in a row as comma-separated data. The position where to insert the new column in the CSV file can be specified in two ways. The first method is to indicate the number of the input column after which to place the new column. For example, if the number is set to 0, the new column will become the first column in the output CSV. If the number is set to 1, the new column will be placed immediately after the first column and it will become the second column in the output CSV. The other method of specifying the position is to select the input column by name (header) and place the new column immediately after it. For example, entering the name "age" will insert the new column in the output immediately after the column whose header is "age". If there are multiple identical headers in the input CSV file, you can activate the "Match All Column Names" option. This option will add the new column after each of the input columns that matches the specified name. If there is any discrepancy in the height of columns or the number of values in the records, you can choose how to handle the incomplete data. The first option, called "Leave CSV Incomplete" will ignore incomplete data and display the CSV as it is. The second option, called "Discard Incomplete values" will remove lines from the file where incomplete data is present (missing values in records). The third option, called "Set Empty Values" will insert an empty element in each such place (an empty element in a CSV file is just two adjacent commas, like this: ",,"). The fourth option, called "Set Custom Values" allows you to specify a custom value, such as "x", and this value will be added in place of all missing CSV values in the output. Additionally, you can manage comments and empty lines in the CSV. You can choose to remove comments or keep them unchanged by specifying the symbol that indicates a comment line in the options. You can also choose to remove or keep all empty lines in the CSV. Csv-abulous!


CSV Column Inserter Examples

Click to try!

Add One Column to a CSV File

In this example, we insert a column with the title "city" into a CSV file that already contains two other columns with titles "name" and "age". The new column consists of three values: "city", "dallas", and "houston", corresponding to the height of the input CSV data. The value "city" is the header value (appearing on the first row) and values "dallas" and "houston" are data values (appearing on rows two and three). We specify the position of the new column by an ordinal number and set it to 1 in the options. This value indicates that the new "city" column should be placed after the first column.

name,age john,25 emma,22
name,city,age john,dallas,25 emma,houston,22
Required options
These options will be used automatically if you select this example.
Enter one or more columns you
want to insert into the CSV.
Specify the column number
after which to insert the new
one (starting from 0).
Specify the column name after
which to insert the new one.
If the specified column name
appears more than once in
CSV, then add the new column
after each such column.
Choose what to do if a column
or row is not completely
filled with values.
If you used "Set Custom Values",
then enter a custom value here
to fill in all empty CSV fields.
Specify the symbol that starts
the comment line.
Don't output empty lines.

Insert a Column By a Column's Name

In this example, we supplement our CSV containing the sports event schedule with an additional "time" column. We select the column name insertion mode and enter "day" as the name of the existing column after which to insert the new column. We also activate the option to repeatedly insert the new column after each found column instance with the same name. As a result, our new column gets added to the two twice. The first time, the new column is inserted after the "day" column in the 3rd position, and the second time, the new column is inserted after the "day" column in the 5th position. As a result, we get a new CSV that contains the exact time of our preferred sports events and contains a more precise schedule.

sport,day,day Boxing,Mon,Thu Rugby,Tue,Fri Tennis,Wed,Sat
sport,day,time,day,time Boxing,Mon,7am,Thu,7am Rugby,Tue,1pm,Fri,1pm Tennis,Wed,10am,Sat,10am
Required options
These options will be used automatically if you select this example.
Enter one or more columns you
want to insert into the CSV.
Specify the column number
after which to insert the new
one (starting from 0).
Specify the column name after
which to insert the new one.
If the specified column name
appears more than once in
CSV, then add the new column
after each such column.
Choose what to do if a column
or row is not completely
filled with values.
If you used "Set Custom Values",
then enter a custom value here
to fill in all empty CSV fields.
Specify the symbol that starts
the comment line.
Don't output empty lines.

Insert Multiple Columns into a CSV

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, we specify their position as "-1", which means count positions from the end (in this case it's the first position from the end, which is equal to the very end).

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
Required options
These options will be used automatically if you select this example.
Enter one or more columns you
want to insert into the CSV.
Specify the column number
after which to insert the new
one (starting from 0).
Specify the column name after
which to insert the new one.
If the specified column name
appears more than once in
CSV, then add the new column
after each such column.
Choose what to do if a column
or row is not completely
filled with values.
If you used "Set Custom Values",
then enter a custom value here
to fill in all empty CSV fields.
Specify the symbol that starts
the comment line.
Don't output empty lines.

Add Incomplete Price Data to CSV

In this example, not only do we add a column with prices to an existing CSV of store orders but also clean up the data and fill in the missing price fields. We input the "price" column as the new column to add in the options and place it after the "category" column. As the new column lacks prices for several of the records, we enable the option to fill in the incomplete data with a custom value "[?]". This symbol maintains the square matrix structure of the CSV file and makes it easier for employees to spot that several products are missing the price data. Additionally, we remove comments from the CSV that start with the "#" symbol and delete empty lines.

order_id,product_id,category,quantity 1001,P123,Clothing,1 1002,B456,Electronics,2 1004,T1011,Toys,3 #fulfill asap 1005,F1314,Food,2
order_id,product_id,category,price,quantity 1001,P123,Clothing,25.99$,1 1002,B456,Electronics,199.99$,2 1004,T1011,Toys,[?],3 1005,F1314,Food,[?],2
Required options
These options will be used automatically if you select this example.
Enter one or more columns you
want to insert into the CSV.
Specify the column number
after which to insert the new
one (starting from 0).
Specify the column name after
which to insert the new one.
If the specified column name
appears more than once in
CSV, then add the new column
after each such column.
Choose what to do if a column
or row is not completely
filled with values.
If you used "Set Custom Values",
then enter a custom value here
to fill in all empty CSV fields.
Specify the symbol that starts
the comment line.
Don't output empty lines.

Add an Empty CSV Column

In this example, we insert an empty column into an existing CSV file containing dogs and their owners. To do this, we leave the new column data in the option empty, which makes the program generate a column of empty fields at the specified position. This trick allows you to create and reserve empty fields for future CSV data filling.

dog_name,breed,owner_name Bella,Bulldog,John Luna,Beagle,Sarah Buddy,Poodle,Michael
dog_name,breed,,owner_name Bella,Bulldog,,John Luna,Beagle,,Sarah Buddy,Poodle,,Michael
Required options
These options will be used automatically if you select this example.
Enter one or more columns you
want to insert into the CSV.
Specify the column number
after which to insert the new
one (starting from 0).
Specify the column name after
which to insert the new one.
If the specified column name
appears more than once in
CSV, then add the new column
after each such column.
Choose what to do if a column
or row is not completely
filled with values.
If you used "Set Custom Values",
then enter a custom value here
to fill in all empty CSV fields.
Specify the symbol that starts
the comment line.
Don't output empty lines.

Pro tips Master online csv tools

You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!

https://onlinetools.com/csv/insert-csv-columns?input=name%2Cage%0Ajohn%2C25%0Aemma%2C22&insert-column=city%250Adallas%250Ahouston&use-column-number=true&column-number=1&use-column-name=false&column-name=name&insert-select-all=false&incomplete-format=leave-incomplete&custom-value=x&remove-comments=false&comment-character=%2523&remove-empty-lines=false

All CSV Tools

Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Quickly convert a CSV file to a JSON data structure.
Quickly convert a JSON data structure to a CSV file.
Quickly convert a CSV file to an XML file.
Quickly convert an XML file to a CSV file.
Quickly convert a CSV file to a YAML file.
Quickly convert a YAML file to a CSV file.
Quickly convert a CSV file to a TSV file.
Quickly convert a TSV file to a CSV file.
Quickly convert a CSV file to evenly aligned text columns.
Quickly convert text columns to a CSV file.
Quickly encode CSV to base64.
Quickly decode base64 to CSV.
Quickly convert CSV to URL-encoding.
Quickly decode CSV from URL-encoding.
Quickly change the CSV column delimiter to a new symbol.
Quickly prepend columns at the beginning of a CSV file.
Quickly append one or more new columns at the end of a CSV file.
Quickly insert one or more new columns anywhere in a CSV file.
Quickly export one or more columns from a CSV file.
Quickly replace any column in a CSV file with a new one.
Quickly delete one or more columns from a CSV file.
Quickly swap two columns in a CSV file.
Quickly exchange columns with rows in a CSV file.
Quickly exchange rows with columns in a CSV file.
Quickly transpose a CSV file.
Quickly truncate columns in a CSV file.
Quickly left-trim and right-trim column values in a CSV file.
Quickly sort data in one or more CSV columns.
Quickly remove double quotes from all CSV fields.
Quickly wrap all CSV fields in double quotes.
Quickly change the character that CSV fields are wrapped in.
Quickly make sure the given CSV file doesn't have errors.
Quickly find rows and columns in CSV that are missing values.
Quickly fill missing CSV values with placeholder values.

Coming Soon

These CSV tools are on the way!
Edit CSV in the Browser

Edit the contents of a CSV file in a neat editor.

Deduplicate CSV Data

Remove duplicate rows in a CSV file.

Print CSV Statistics

Display detailed information about a CSV file.

Convert CSV to HTML

Convert a CSV file to an HTML table.

Convert HTML to CSV

Convert an HTML table to a CSV file.

Convert CSV to Markdown

Convert a CSV file to a Markdown table.

Convert Markdown to CSV

Convert a Markdown table to a CSV file.

Convert CSV to ASCII Table

Draw an ASCII table from CSV data.

Convert CSV to ANSI Table

Draw an ANSI table from CSV data.

Convert CSV to Unicode Table

Draw a Unicode table from CSV data.

Convert CSV to PDF

Convert CSV to a PDF document.

Convert PDF to CSV

Extract data from a PDF and create a CSV file.

Convert CSV to a Screenshot

Create a screenshot of CSV data.

Convert CSV to an Image

Draw a CSV file as a PNG, JPG or GIF picture.

Convert Image to CSV

Extract data from an image and create a CSV file.

Convert CSV to Excel

Convert a CSV file to an Excel spreadsheet.

Convert Excel to CSV

Convert an Excel spreadsheet to a CSV file.

Convert CSV to vCard

Convert a CSV file to a vCard file.

Convert vCard to CSV

Convert a vCard file to a CSV file.

Convert CSV to LaTeX

Convert CSV to a LaTeX table.

Convert CSV to SQL

Generate SQL insert queries from a CSV file.

Convert SQL to CSV

Create a CSV file from SQL query results.

Convert CSV to qCSV

Convert a CSV file to a qCSV (quoted CSV) file.

Convert qCSV to CSV

Convert a qCSV (quoted CSV) file to a CSV file.

Convert CSV to INI

Convert a CSV file to an INI file.

Convert INI to CSV

Convert an INI file to a CSV file.

Convert CSV to JSONL

Convert a CSV file to a JSONL (JSON Lines) file.

Convert JSONL to CSV

Convert a JSONL (JSON Lines) file to a CSV file.

Convert CSV to TXT

Convert a CSV file to a plain text file.

Convert TXT to CSV

Convert a plain text file to a CSV file.

Convert CSV to 0SV

Convert a CSV file to a null-separated values file (0SV).

Convert 0SV to CSV

Convert a null-separated values file (0SV) to a CSV file.

Convert CSV to SSV

Convert a CSV file to a semicolon-separated file (SSV).

Convert SSV to CSV

Convert a semicolon-separated file (SSV) to a CSV file.

Convert CSV to HSV

Convert a CSV file to a hash-separated file (HSV).

Convert HSV to CSV

Convert a hash-separated file (HSV) to a CSV file.

Convert CSV to PSV

Convert a CSV file to a pipe-separated file (PSV).

Convert PSV to CSV

Convert a pipe-separated file (PSV) to a CSV file.

Convert CSV to SQLite

Create an SQLite database from the given CSV file.

Convert SQLite to CSV

Export tables from an SQLite database as CSV files.

Convert CSV to GeoJSON

Convert a CSV file to a GeoJSON file.

Convert GeoJSON to CSV

Convert a GeoJSON file to a CSV file.

Merge CSV Files

Merge together two or more CSV files.

Compare Two CSV Files

Visually show the differences between two CSV files.

Diff Two CSV Files

Run the diff algorithm on two CSV files.

Find Data in CSV

Find CSV cells that contain certain data.

Filter CSV Cells

Return data in a CSV file that matches a pattern.

Slice CSV

Extract a slice from a CSV file.

Cut CSV

Cut a fragment from a CSV file.

Rotate CSV Columns

Move CSV columns to the left or right.

Rotate CSV Rows

Move CSV data rows up or down.

Sort CSV Rows

Sort the data in one or more CSV rows.

Shuffle CSV Columns

Randomly change the positions of CSV columns.

Shuffle CSV Rows

Randomly change the order of CSV rows.

Shuffle CSV Values

Randomly change the order of all CSV values.

Rename CSV Columns

Change the name of CSV columns.

Create a Random CSV

Generate a random CSV of any size.

Create an Empty CSV File

Generate a CSV file that contains nothing.

Create a Large CSV File

Generate a large CSV file for testing.

Create a Custom CSV File

Generate a custom CSV file with m rows and n columns.

Delete Empty CSV Columns

Remove CSV columns that are completely empty.

Delete Empty CSV Rows

Remove CSV rows that are completely empty.

Delete Empty CSV Values

Remove all fields in a CSV file that are empty.

Delete Empty CSV Lines

Remove all empty lines in a CSV file.

Remove CSV Separator

Delete the comma separator from CSV files.

Remove Extra CSV Commas

Delete extra commas around CSV values.

Delete CSV Comments

Delete comments (lines starting with # or //) from CSV files.

Delete CSV Header

Delete the column header from a CSV file.

Delete First CSV Line

Delete the first line from a CSV file.

Compress a CSV File

Minify a CSV file and remove unnecessary whitespaces.

Optimize CSV File Size

Reduce the file size of a CSV file.

Change CSV Encoding

Change the character encoding of a CSV file to UTF8 or ISO-8859-1.

Add Extra Spaces in CSV

Add extra spaces between CSV columns.

Convert CSV to a Matrix

Convert a CSV file to an m-by-n matrix.

Convert CSV to an Array of Arrays

Convert a CSV file to an array of arrays of fields.

Convert an Array of Arrays to CSV

Convert an array of arrays of fields to a CSV file.

Convert CSV Columns to a List

Create a list from one or more CSV columns.

Convert CSV Rows to a List

Create a list from one or more CSV rows.

Convert CSV Columns to an Array

Create an array from one or more CSV columns.

Convert CSV Rows to an Array

Create an array from one or more CSV rows.

Find CSV Dimensions

Find the number of rows and columns of a CSV file.

Count CSV Columns

Find the number of columns in a CSV file.

Count CSV Rows

Find the number of rows in a CSV file.

Sum CSV Columns

Find the sum of CSV columns.

Sum CSV Rows

Find the sum of CSV rows.

Average CSV Columns

Find the average value of CSV columns.

Average CSV Rows

Find the average value of CSV rows.

Add Color to CSV

Use different colors for CSV data, quotes, and commas.

Animate a CSV File

Animate CSV data by showing column after column.

Fix a Broken CSV

Automatically fix a broken CSV.

Add Errors to CSV

Introduce random errors to a CSV file for fuzz testing.

Anonymize CSV Data

Hide personal or sensitive information in a CSV file.

Censor CSV Data

Mask data in a CSV file.

Hide a Message in a CSV

Hide a secret message in a CSV.

Encrypt CSV

Encrypt a CSV file and hide information in it.

Decrypt CSV

Decrypt a previously encrypted CSV file and make it readable.

Visualize CSV

Create a visual drawing that shows the CSV structure.

Create a CSV File

Create a new CSV file in the browser.

Unleash Zalgo on CSV

Distort a CSV file by infusing it with Zalgo characters.

Purge Zalgo from CSV

Neutralize the chaotic Zalgo and restore CSV integrity.

CSV Viewer

Preview the contents of a CSV file in an interactive editor.


Subscribe!

Subscribe to our updates. We'll let you know when we release new tools, features, and organize online workshops.

Enter your email here


Feedback. We'd love to hear from you! 👋



Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!