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:

"First Name", "Last Name", "Email", "Age"
"Bob", "Smith", "bob@mywebsite.com", "34"
"Jane", "Wilson", "jane@example.com", "21"
"Pete", "Von Burg", "pete@example.com", "44"
(download as CSV file)


First Name, Last Name, Email, Age
Julie, Brown, julie@example.com, 52
Dan, Wong, dan@example.com, 19
Tim, Hortons, tim@example.com, 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 somteimes 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:

  First Name, Last Name, Email, Age
  Julie,    , julie@example.com, 52


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

  "First Name", "Last Name", "Email", "Age"
  "Bob", "", "bob@mywebsite.com", "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, zoe@mywebsite.com, 48
  Renée, Weber, renee@example.com, 33
  Justiñen Gonçalves, justinen@mywebsite.com, 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!

You still can not find the answer to your question?
Do not hesitate to contact our support team or search for other topics!

Try Mailjet now ?
Create an account - no engagement, no hidden fees