Import a Custom HTML Template
Copied
If you want more control over your email design than our templates offer, you can code your own HTML template and import it to your Mailchimp account. After you import your custom template, you can use it for future campaigns.
In this article, you'll learn a few ways to import and edit your custom HTML template.
Before you start
Here are some things to know before you begin this process.
- This is an advanced feature and is recommended for users familiar with custom coding. Contact your developer or hire a Mailchimp Expert if you need assistance.
- Accounts on a Mailchimp Standard plan or higher can use custom HTML templates. To find out what features are included in each plan, check out our pricing page.
- Before you create your own HTML template or hire a developer, consider other types of templates that don't require any HTML knowledge.
- For code tips and best practices, learn about limitations of HTML in email design, and browse Mailchimp's Email Design Guide.
- When you edit a code-your-own template in the Template Builder, your changes may affect existing draft campaigns that use the template.
- We'll run your HTML through a validator service to make sure the syntax is correct.
- Include the *|UNSUB|* tag in your custom template, which is required in all campaigns.
- Make sure your HTML file's character encoding is UTF-8.
- Format all images as JPG, JPEG, PNG, or GIF. Include any PDFs or other documents to host with Mailchimp that are linked in your template code.
Import options
After you or your developer code your template's HTML, you can import the template with one of these methods.
Paste in code
To create an email with pasted HTML code, follow these steps.
- Click Campaigns, then click Email templates.
- Click Code your own, then click Continue.
- Paste your code into the Edit code field, then click Save.
- To insert an image, click Edit Design from the bottom task bar to load the Design menu.
a. You can also edit your email template Page, Preheader, Header, Body, Footer, Mobile Styles and Referral Badge from the Design Menu. 5. Use the Preview and Test menu to view your template or send a test email.
a. Click the Edit Design | Edit Code buttons to make changes.
b. Click Content Studio to select or upload images. 6. Click Save and Exit, then name your design, then click Save. 7. View your template under the “Saved” tab. Follow the prompt to view your template. 8. Select your preferred template to Create email.
a. Use More options menu to Edit template, Send to Mandrill, Replicate template, Share template, Export as template or Rename template. 9. Complete the email form, Add a Social Post to Your Email, then Preview your email and click Send.
Nice job. You can find your new custom-coded template on the Templates page of your account.
Import HTML
To create a custom template by importing an HTML file from your computer, follow these steps.
- Click Campaigns, then click Email templates.
- From the Code your own menu, click Import HTML
- Click Add file to import your HTML.
- To insert an image, click Edit Design from the bottom task bar to load the Design menu.
a. You can also edit your email template Page, Preheader, Header, Body, Footer, Mobile Styles and Referral Badge from the Design Menu. 5. Use the Preview and Test menu to view your template or send a test email.
a. Click the Edit Design | Edit Code buttons to make changes.
b. Click Content Studio to view designs. 6. Click Save and Exit, then name your design, then click Save. 7. Follow the prompt to view your template. Select your preferred template to Create email.
a. Use More options menu to Edit template, Send to Mandrill, Replicate template, Share template, Export template or Rename template. 8. Complete the email form, Add a Social Post to Your Email, then Preview your template and click Send.
Nice job. You can find your new custom-coded template on the Templates page of your account.
Import ZIP
There are a few requirements to review before you import your ZIP file.
- Your ZIP file must be less than 1MB and contain only 1 HTML file. If you have more than one HTML file, we'll use the first one we find.
- Place all images and files in the root directory of the ZIP file and not in subfolders. We'll upload all your images and files to the content studio and create absolute paths for you when we convert your ZIP.
- Use only letters, numbers, and hyphens in the file name. Spaces or unusual characters can cause problems when you import.
- The upload is case sensitive, so your code must match your file names exactly.
After your file is properly saved and formatted, you’re ready to create your template. To create a template by importing a ZIP file from your computer, follow these steps.
- Click Campaigns, then click Email templates.
- From the Code your own menu, click Import ZIP.
- Click Add file to import your Zip file.
- To insert an image, click Edit Design from the bottom task bar to load the Design menu.
a. You can also edit your email template Page, Preheader, Header, Body, Footer, Mobile Styles and Referral Badge from the Design Menu. 5. Use the Preview and Test menu to view your template or send a test email.
a. Click the Edit Design | Edit Code buttons to make changes.
b. Click Content Studio to view designs. 6. Click Save and Exit, then name your design, then click Save. 7. Follow the prompt to view your template. Select your preferred template to Create email.
a. Use More options menu to Edit template, Send to Mandrill, Replicate template, Share template, Export template or Rename template. 8. Complete the email form, Add a Social Post to Your Email, then Preview your template and click Send.
Nice job. You can find your new custom-coded template on the Templates page of your account.
Edit your custom template
After you import your custom template, you can modify it on the Edit Code pane of the template builder. If you used Mailchimp’s Template Language, you can also apply styles on the Edit Design tab.

When you’re ready to use your custom template in a campaign, you can add content and refine your design in the email builder. Any further changes made in the template builder may affect draft and ongoing campaigns that use the template.
More editing resources
Here are some more resources to help you edit your custom-coded template.
- Getting Started With Mailchimp’s Template Language
- Where to Edit Template Code
- Add a Background Image to a Custom HTML Template
- Use Repeatable or Variable Content Blocks
Use your template in an email
To use a saved custom-coded template for your email campaign, follow these steps.
- Click Campaigns, then click Email templates.
- Click the drop-down next to the template you want to work with, and choose Create campaign.

You can also find them under Saved Templates in the legacy email builder.
Related
Types of Email Templates
Whether you're an expert or just starting, Mailchimp has an email template for you. Learn about different types of templates and how to pick one.
Getting Started with Mailchimp's Email Template Language
Use Mailchimp's Template language to create your own email template. Learn how to create sections, use merge tags, test your template, and more.
Limitations of HTML Email
Coding an HTML email isn't much different from coding a website was back in the late '90s. Learn about the limits of email and how to work around them.
