Skip to content

Shaw guides

How to Copy an HTML Email Template from Any Brand (and Reuse It in Klaviyo)

Learn how to export clean HTML from brand emails, strip tracking pixels and quoted-printable noise, re-host images for Klaviyo, or skip the cleanup with Shaw.

Published

Updated November 21, 2026. Covers manual HTML email source extraction and Klaviyo import requirements alongside Shaw's Email Archive and 1-click Klaviyo workflow.

Unlike standard web pages, production emails still rely on nested <table> layouts, inline CSS attributes, fixed 600px wrappers, and MSO conditional comments so Outlook and Gmail do not shred two-column blocks. When you admire a brand's welcome series, product drop, or replenishment email and want to extract its underlying HTML template cleanly for your own Klaviyo account, here is how to do it properly, and why Shaw removes 90% of the cleanup work.

Deliverability and trademark rule: Never keep another sender's domain links, brand logos, sender headers, or proprietary copy inside a reused template. Keeping foreign domains inside clickable hrefs or image URLs triggers spam-alignment flags (DMARC/domain mismatch) as well as trademark issues.

Step 1: Extract the raw HTML MIME part cleanly

Clicking "Inspect Element" inside Gmail webmail wraps the original template inside Gmail's own web UI <div> classes and mangles table attributes. Pull the clean MIME text/html source instead:

  1. In Gmail: Open the email, click the three-dot menu (More) on the top right of the message, and select Show original.
  2. Locate the HTML MIME section: Click Download Original (or Copy to clipboard), open the raw .eml text in your editor, and scroll to the block marked Content-Type: text/html.
  3. Decode Quoted-Printable or Base64 encoding:
  • If the header shows Content-Transfer-Encoding: quoted-printable, soft line wraps end in = and attributes appear as width=3D"600". Decode with Python's built-in quopri module below rather than manually finding and replacing =3D.
  • If it shows Content-Transfer-Encoding: base64, pipe the encoded block through base64 --decode > email.html.
python3 -c 'import quopri, sys; sys.stdout.buffer.write(quopri.decodestring(sys.stdin.buffer.read()))' < raw_html_part.txt > email.html

Step 2: Strip tracking pixels, recipient links, and personal tokens

Before rendering or saving a captured email template anywhere:

  1. Delete 1x1 open-tracking pixels: Look near the top or bottom </body> for tiny width="1" or height="1" <img> tags pointing to /wf/open, /trk, klclick, or ESP pixel URLs and remove them completely.
  2. Scrub recipient-tied hrefs and click-wrapper redirects: Production emails rewrite every <a> link through ESP click-tracking redirects tied to the original subscriber's address. Replace every href="..." with clean destination URLs on your own domain.
  3. Remove personalization tokens and old footer legal addresses: Replace sender-specific unsubscribe links, view-in-browser hashes, and another company's physical mailing footer with clean placeholders.

Step 3: Audit 600px table layout, MSO conditionals, and media queries

Inspect the cleaned HTML locally in a browser window narrowed to 390px and 640px:

  • Check whether two-column desktop grids use role="presentation" tables with @media only screen and (max-width: 600px) responsive helper classes (.stack-col { display: block !important; width: 100% !important; }).
  • Replace every image src referencing the original brand's CDN with your own hosted product images sized at 2x width (1200px wide for a 600px hero) compressed cleanly.
  • Inline critical font, color, padding, and border styles directly onto <td> and <a> tags so webmail clients that strip <style> blocks preserve hierarchy.

Step 4: Import into Klaviyo and test across real clients

  1. In Klaviyo, go to Content > Templates > Create > Import HTML (or upload via the Klaviyo Templates API).
  2. Re-upload every image into Klaviyo's media library so images stay reliable without third-party hotlink blocking.
  3. Insert Klaviyo's required unsubscribe syntax ({% unsubscribe %}) and organization address variables in the footer, then send Preview and test emails to real Gmail, Apple Mail, and Outlook inboxes.

Why manual email scraping falls apart at campaign speed

Decoding quoted-printable MIME blocks, scrubbing dozens of encoded ESP click-tracking URLs, fixing Outlook table breaks, rewriting every copy block, and uploading individual assets one by one takes 60 to 90 minutes per single template before you even send a test. Static inspiration tools like Really Good Emails or Milled give you screenshots or plain newsletter archives, leaving you stuck repeating that manual teardown (compare Shaw vs Really Good Emails and Shaw vs Milled).

Why it is much easier to just use Shaw

Instead of decoding raw .eml files and stripping ESP tracking wrappers by hand, it is much easier to just use Shaw.

  • 2,798 full-height lifecycle emails ready to study and remix: Shaw's Email Archive spans 2,798 captured campaign and transactional emails across 154 brands and vertical hubs like Fashion Emails, Beauty Emails, and CPG Emails. Every email strips recipient tracking tokens automatically and renders at full height across Web and Phone viewports inside the same brand tearsheet as that brand's website and product app. (Explore structure benchmarks in our 2,798-email lifecycle study.)
  • Apply your Brand Kit and edit visually: Open any email clone in Remix to rewrite copy and apply your Brand Kit palette and typography, then refine sections in Shaw's Email Studio.
  • Publish clean drafts straight to Klaviyo over OAuth: On Shaw Pro or operator workspaces, publishing to Klaviyo automatically uploads your drawn images to Klaviyo's image CDN, resolves links to your domain, validates {% unsubscribe %}, and creates draft campaigns or reusable templates without hand-coding MIME HTML. Read the full walkthrough in Lifecycle email templates to Klaviyo.

Sources

  1. https://developers.klaviyo.com/en/reference/templates
  2. https://developers.klaviyo.com/en/docs/campaigns_api_overview
  3. https://support.google.com/mail/answer/29436
  4. https://shaw.ai/emails
  5. https://shaw.ai/compare/shaw-vs-really-good-emails

Explore Shaw

Browse 1,000+ working HTML/CSS/JS clones across 750+ brands and 21 categories, compare alternatives, or read the docs:

1,000+ live surfaces.
Ready to inspect & remix.

Browse websites, apps, and brand tearsheets on Shaw.