How to build a CSV file?

Did you encounter any problems when importing your CSV file? Or perhaps you'd like some advice on the format to use? No problem, just follow these few recommendations ...

What is a CSV file?

A CSV (“comma separated values”) file is a simple text file where each value is separated by commas, allowing data to be saved in a table format. You can use a CSV to upload your contact lists and properties (name, phone, address, etc). And you can easily create a CSV file using your favourite text editor (Word, Notepad, …) or spreadsheet program (Excel, Google Sheets, …) by doing a “Save As” or “Export”.

CSV examples:

"Email", "First Name", "Last Name", "Age"
"", "Bob", "Smith", "34"
"", "Jane", "Wilson", "21"
"", "Pete", "Von Burg", "44"

Email, First Name, Last Name, Age, Julie, Brown, 52, Dan, Wong, 19, Tim, Heart, 27

(download as CSV file)

Although there is no standard structure for CSV files, there are similar ‘rules’ used by many software applications and systems. Please ensure your CSV file follows these rules:

•   Each line has the same number of values (fields), and sometimes the values are enclosed with quotations (“”)

•   Empty fields need to be separated by commas and/or quotations

For example: If no last name was given, that empty space (highlighted in yellow below) still needs to be separated by a comma:

  Email, First Name, Last Name, Age, Julie,    , 52

Or if your values are enclosed by quotations, the empty space needs to be enclosed by quotations as well:

  "Email", "First Name", "Last Name", "Age"
 "", "Bob", "", "34"

• Ensure there are no blank lines in the CSV file

•  Remove unnecessary spaces at the beginning or end of each field
       "Lucas"          " Lucas"          "   Lucas  "

•  Make sure your email addresses are valid

If you did not use a confirmed or double opt-in process like our Subscription Widget when you collected the contact’s email addresses and properties, do it now. Otherwise when you import your contact lists, you may end up with a large number of invalid email addresses which will hurt your deliverability and reputation. The sooner you detect an invalid email address, the better!

One last question before you start creating your CSV file:

Does your data contain special characters (£, €, å, é, î, ü ...)?

For example:, Zoë, Blanc, 48, Renée, Weber, 33, Justiñen Gonçalves, 30

No, there are no special characters in my file.
Excellent! You are now ready to upload your CSV contact list!

Yes, my CSV file contains special characters.
(And please remember, email addresses cannot contain special characters.)

Before you can upload your contact lists, your CSV file needs to be encoded to UTF-8 to handle these special characters. There are several ways to create a valid UTF-8 CSV file:

Google Docs
Upload your file to a new google spreadsheet and then immediately download it:

  File → Download as → Comma-separated values (.csv, current sheet)

The downloaded file will be saved with UTF-8 formatting.

Notepad (Windows)
This default text editor allows you to save UTF-8 encoded text files.

TextWrangler (Mac)
This is a popular and free text editor. Simply open your CSV file in TextWrangler, and save it with UTF-8 encoding.

Apache OpenOffice (Mac, Windows, Linux)
This free, open-source office suite lets you save UTF-8 encoded text files.

Now that your file is encoded, you are ready to upload it!

If your CSV file is still not accepted by our system, our Support Team will be happy to help you -- just open a ticket and attach your CSV file!

Wurde Ihr Frage immer noch nicht beantwortet?
Zögern Sie nicht unser Support Team zu kontaktieren oder nach anderen Themen zu suchen!

Wollen Sie Mailjet jetzt testen?
Ein Konto erstellen - keine Verpflichtungen, keine versteckten Kosten