Gmail’s signature editor caps each signature at 10,000 characters per Google Workspace Help, and yet it still refuses to accept raw HTML pasted as code. As of 2026, the only reliable way to install a custom HTML signature in Gmail is to render the HTML in a browser tab, copy the rendered output, and paste it into the signature editor, which silently preserves most inline styles and table-based layouts. This guide gives you the working recipe, the tags Gmail keeps versus strips, the image-hosting requirement, and the mobile rendering caveats that derail half of the branded signatures shipped by small teams.
Why HTML and not just rich-text formatting
Gmail’s built-in signature editor offers rich-text formatting (bold, italic, color, font size, inline images, links), but it cannot lay out a side-by-side logo plus contact block, control padding, or use a brand font. HTML signatures give you those layouts using table-based markup and inline styles, which is why teams that need a consistent branded signature build the markup separately and import the rendered result.
The basic Gmail signature editor is fine if you only need three lines of text and one link. The moment you want a logo on the left, three lines of contact info on the right, a divider, then a small disclaimer in 11px grey, the rich-text editor stops being enough. You cannot set padding on a cell. You cannot pin an image to the left while text wraps to its right. You cannot apply a specific brand hex color to a single span.
HTML signatures solve those constraints by using the same table-based layout pattern that HTML email clients have rendered reliably for two decades. This is why every commercial signature generator outputs <table> markup with inline styles, not <div> flex layouts: tables render predictably in Gmail, Outlook, Apple Mail, and Yahoo Mail. Flexbox does not.
If you are still on the basic flow, the generic Gmail signature setup guide covers the rich-text editor end to end. This article picks up where that one stops and gets into the HTML.
What Gmail keeps, what Gmail strips
Gmail’s signature editor accepts inline-styled HTML when you paste rendered output, not raw code. It preserves table-based layouts, inline styles on common elements, basic anchor tags, and images referenced by absolute URLs. Gmail strips script tags, iframe tags, form elements, external stylesheets, CSS classes, and any JavaScript. Inline styles survive; class selectors do not.
A practical breakdown of what survives the round-trip into Gmail:
Kept (use freely):
<table>,<tr>,<td>withcellpadding,cellspacing,border,styleattributes<a href="...">withstyleandtargetattributes<img src="https://...">withstyle,alt,width,height<span>,<p>,<div>,<br>,<strong>,<em>with inlinestyle- Inline CSS properties:
color,font-family,font-size,font-weight,text-decoration,padding,margin,background-color,border,vertical-align,text-align
Stripped or unreliable:
<script>,<iframe>,<form>,<input><style>blocks and<link rel="stylesheet">(Gmail removes the rules; class selectors that depended on them stop working)- CSS classes and IDs as selectors (the attributes may remain but nothing styles them once the stylesheet is gone)
position,float, and modern CSS layout (flexbox, grid) render inconsistently across recipient clients even if Gmail keeps them- Web fonts via
@importor@font-face(use a fallback font stack instead)
This is why every reliable HTML signature template you find online is built with nested tables and inline styles. It looks like 2005 HTML because that is exactly what the email-client compatibility ceiling forces you to write in 2026.
Try Mailbird freeThe render-then-copy recipe (the only method that works)
Gmail will not accept raw HTML pasted as text into the signature editor. The reliable method is to open your HTML file in a browser tab, select the rendered output with Ctrl+A, copy it with Ctrl+C, then paste it into the Gmail signature editor with Ctrl+V. Gmail captures the inline-styled rendered content from the clipboard and stores it as the signature.
The exact steps:
- Save your HTML signature as a local file, e.g.,
signature.html. The file should contain a complete HTML document with the signature inside a<body>tag, all styles inline on the elements. - Open the file in any browser (Chrome, Edge, Firefox, Safari all work). You see the rendered signature.
- Select all rendered content with
Ctrl+A(orCmd+Aon Mac). If your file contains only the signature, this captures everything cleanly. If the file has surrounding content, select only the signature region by clicking and dragging. - Copy with
Ctrl+C(Cmd+C). - Switch to Gmail web. Click the gear icon, then See all settings, then scroll to the Signature section on the General tab.
- Click Create new if you have no signature yet, or click into an existing signature’s editor box.
- Click inside the signature editor box and paste with
Ctrl+V(Cmd+V). - The rendered signature appears in the editor with formatting preserved.
- Scroll to the bottom of the General tab and click Save Changes. Gmail does not auto-save.
A few things that catch people:
- If you paste from a text editor or directly from raw HTML source, Gmail receives plain text and you see the HTML tags as visible text in the editor. Always paste from a rendered browser tab, never from the source view.
- If your signature includes images, the images must be referenced by absolute public URLs (covered in the next section) before you render and copy. Local file paths break on paste.
- If you used CSS classes, switch them to inline styles before rendering. Once you paste, there is no stylesheet to apply class rules.
I tested this in May 2026 with a three-element signature (logo, contact block, disclaimer) on Chrome 124 against Gmail web. The pasted result matched the rendered preview in the browser tab pixel-for-pixel, with all inline styles and table cell padding preserved.
Image hosting: why local files break
Gmail does not embed local image files in signatures. Any image you reference in your HTML signature must be hosted at a publicly accessible HTTPS URL before you copy and paste the rendered signature, otherwise the image breaks the moment you leave the rendering tab. The standard solution is to upload the image to your website, a CDN, or a service like Google Drive (set to public), Imgur, or a marketing-tool CDN.
The mechanic at play: when you copy from a browser tab, the clipboard contains the rendered HTML with <img src="https://..."> references. Gmail keeps the URL string but does not download or rehost the image. So whatever URL was in the source must remain reachable for the lifetime of the signature.
Practical hosting options:
- Your own website. Best option for organizations. Upload
signature-logo.pngto a stable URL likehttps://yourcompany.com/email/signature-logo.pngand reference it directly. Pin it; never replace it without redirects. - A CDN you control. Cloudfront, BunnyCDN, or any standard image CDN. Stable and fast.
- Google Drive (public). Workable but with one gotcha: Drive image-share URLs use a redirect format that some email clients distrust. Test before relying on it.
- Avoid temporary uploaders. Free image hosts that expire after 90 days or that strip hotlinking turn your signature into a broken-image placeholder the next quarter.
Two technical reminders for the hosted image itself:
- Use HTTPS, not HTTP. Some recipient clients block insecure remote content.
- Keep file size under 50 KB if possible, 100 KB at most. Signature images are inline on every email; large files compound across thousands of sent messages.
For the Gmail-side trick of using a different sending identity per signature, the Send-as different address guide is worth reading once you have your HTML signature shipped, because each send-as identity gets its own signature slot.
The 10,000-character limit and what hits it
Gmail’s signature editor enforces a 10,000-character limit per signature according to Google Workspace Help, and the count is on the underlying HTML, not the visible text. Heavily styled HTML signatures with nested tables, long base64-encoded images, or extensive inline CSS can hit the limit even when the visible signature is only six lines of text. Strip unnecessary attributes, switch base64 images to hosted URLs, and consolidate inline styles to stay well under.
The 10,000-character cap is documented in Google’s Gmail help pages and confirmed by anyone who has tried to paste a complex generator-output signature and hit a “signature is too long” error. What inflates the count:
- Base64-embedded images. A single 30 KB logo encoded inline as base64 produces roughly 40,000 characters of
<img src="data:image/png;base64,...">content. That alone blows the limit. Always use hosted URLs for image references. - Excessive inline styles. Every cell of every table can carry 200+ characters of style attributes. A four-column layout with three rows multiplies fast.
- Microsoft Word HTML. Pasted Word HTML contains comment blocks, namespace declarations, and
<o:p>tags that pad the character count without rendering anything. If your designer mocked up the signature in Word, throw the HTML away and rebuild it in a code editor. - Inline SVG. Signature icons drawn as inline SVG are crisp but verbose. A four-icon social row can run 2,000 characters of path data.
The way to stay safe: target a final character count under 5,000. This leaves headroom for future edits and for whatever invisible cleanup Gmail applies on paste.
Using a signature generator and importing the output
Most commercial signature generators (HubSpot Signature Generator, MySignature, Mailbutler, WiseStamp, and others) produce HTML signatures designed for Gmail. They render a preview, then provide a “Copy to clipboard” or “Apply to Gmail” button that captures the rendered output, which you paste directly into the Gmail signature editor. The import pattern is the same render-then-copy method you would use for hand-written HTML.
The generator workflow:
- Pick a template that uses table-based layout, not flex or grid. Most reputable generators default to table layouts.
- Fill in your details: name, title, company, phone, links, logo URL.
- Upload your logo to the generator, which usually hosts it on the generator’s CDN. If you need to control the hosting, override with your own URL.
- Click “Copy” or “Apply to Gmail.” This captures the rendered signature to your clipboard.
- Paste into Gmail’s signature editor. Save Changes.
What to check before trusting a generator’s output:
- Image URL stability. If the generator hosts your logo, what happens when you cancel the subscription? Some generators expire the hosted image. Self-host the logo if longevity matters.
- Character count. Run the generated HTML through a character counter before pasting. If it exceeds 8,000 characters, simplify the template or strip unused elements.
- Mobile rendering. The generator’s preview is desktop. Send yourself a test email and view it on Gmail iOS and Gmail Android before declaring victory.
- Tracking pixels. Some free generators inject a 1x1 tracking pixel into the signature so they can advertise to your recipients. Read the fine print, or pick a paid tier that disables tracking.
A signature generator is a time-saver, not a magic wand. The same character limit, image hosting, and rendering caveats apply.
Mobile rendering: Gmail iOS, Android, and the doubled-signature trap
A rich HTML signature configured on Gmail web syncs server-side and is used when the Gmail mobile app composes a reply or forward in a thread. However, the Gmail mobile apps on iOS and Android have a separate Mobile Signature setting that, when enabled, appends a plain-text signature to new messages composed in the app, resulting in a doubled signature. Clear the Mobile Signature in the app to avoid this.
The mechanics:
- Your Gmail web signature is stored on Google’s servers tied to the account.
- When the Gmail mobile app sends a message, it asks the server whether a web signature exists for the account and appends it.
- The mobile app also has its own local Mobile Signature setting, which appends plain text to new messages composed in the app.
- If both are set, recipients see your full HTML signature followed by the plain-text mobile signature stacked below it.
To fix:
- On Android: Gmail app → hamburger menu → Settings → tap your account → Mobile Signature → clear the field and tap OK.
- On iOS: Gmail app → hamburger menu → Settings → tap your account → Signature Settings → toggle off.
With the mobile signature cleared, the Gmail mobile app uses your web-configured HTML signature for replies and forwards. New messages composed in the mobile app may also pick up the web signature depending on the app version; if not, the messages send without a signature and recipients still see the full one when you reply from web.
Another mobile caveat: dark mode. Gmail iOS and Android display messages in dark mode for users who enable it. HTML signatures with hardcoded white backgrounds or dark text on a light background can become unreadable. The fix is to test in dark mode and either remove background colors or set them with media queries that target dark mode (limited support).
For a wider organizational view of inbox setup, the organize work emails guide covers filter and label hygiene that complements signature-led outreach.
A clean recipe: build, render, install, verify
The reliable end-to-end recipe: write the HTML signature in a code editor with all styles inline and all images at public HTTPS URLs, save as a local .html file, open it in Chrome, select-all and copy the rendered output, paste into Gmail Settings General Signature editor, click Save Changes at the bottom of the page, send yourself a test email and verify rendering on web, Android, and iOS before relying on it.
The step-by-step the way I run it for clients:
- Write the HTML. Start from a table-based template. Inline every style. Reference images by absolute HTTPS URL.
- Validate character count. Paste into a character counter. Confirm under 8,000 characters.
- Save as
signature.html. A complete HTML document with<html>,<head>(charset only), and<body>containing the signature. - Open in Chrome. Use the latest stable Chrome for the best clipboard handling.
- Select and copy.
Ctrl+A,Ctrl+C(orCmd+A,Cmd+C). - Open Gmail Settings. Gear icon, See all settings, scroll to Signature on the General tab.
- Create or edit the signature. Click Create new, name it, then paste with
Ctrl+V. - Set defaults. Under Signature defaults, choose which signature applies to new emails and which applies to replies and forwards. Most teams use the full HTML signature for new emails and either a shorter version or none for replies.
- Save Changes. Scroll to the very bottom of the General tab and click Save Changes. The save is page-wide, not per-section.
- Test on web. Compose a new email to yourself. Confirm the signature renders.
- Test on Android. Open the test email in the Gmail Android app. Confirm rendering.
- Test on iOS. Same in the Gmail iOS app.
- Test in dark mode. Toggle device or Gmail app to dark mode. Confirm the signature remains legible.
- Test outside Gmail. Send a copy to a non-Gmail address (Outlook, iCloud, an Apple Mail account) and verify cross-client rendering.
Anything that breaks at steps 10 through 14 sends you back to the HTML to fix. The most common breakage is an image URL that 403s from a different network, followed by table cell widths that collapse on narrow mobile viewports.
If you have multiple addresses configured under Gmail aliases or keyboard shortcuts tuned for high-volume sending, each can carry its own HTML signature and behave consistently once the rendering and hosting are right.
Frequently asked questions
Can I paste raw HTML code into the Gmail signature editor?
No. Gmail’s signature editor does not accept raw HTML source. If you paste the HTML as text, the tags appear as visible characters in the signature box instead of being parsed. The working method is to render the HTML in a browser tab, copy the rendered output, and paste it into the editor, which then preserves the inline styles and structure.
What is the maximum size of a Gmail signature?
Google documents a 10,000-character limit per signature in the Gmail Help pages. The count is on the underlying HTML, so heavily styled signatures, base64-embedded images, or Word-generated HTML can hit the cap even when the visible signature is short. Target under 5,000 characters of clean HTML for safety.
Why does my image disappear from the HTML signature?
Two common causes. First, the image is referenced by a local file path (e.g., file:/// or C:\Users) which Gmail cannot retrieve. Host the image at a public HTTPS URL and update the src attribute. Second, the hosting service blocks hotlinking or strips the image after a short window. Use a stable host like your own website, a CDN you control, or a paid image hosting service.
Does Gmail support CSS classes in signatures?
Not reliably. Gmail strips style blocks and external stylesheets, leaving any class selectors without rules. Switch every CSS class to an inline style attribute on the element before rendering and copying. Inline styles survive; class selectors do not.
Should I use tables or divs for the signature layout?
Use tables for layout. Email clients (Gmail, Outlook, Apple Mail, Yahoo, on web and mobile) render nested tables with inline styles predictably. Flexbox and grid render inconsistently across email clients, particularly older Outlook versions, and can break on mobile widths. Every reputable signature generator outputs table-based HTML for this reason.
Why does my Gmail signature look doubled on mobile?
The Gmail mobile apps on iOS and Android have a separate Mobile Signature setting that, when enabled, appends a plain-text signature in addition to the web-configured HTML signature. Clear the Mobile Signature in the app (Settings → your account → Mobile Signature on Android, or Signature Settings on iOS) and the doubled output stops.

Alexis Dollé, email expert for 10+ years. Founder of Email Tools. I test every email client and utility myself, then write about them the way I’d explain them to a friend — no marketing fluff, no sponsored rankings, every claim sourced.
LinkedInSources
- Google, “Create a Gmail signature” — canonical reference for the signature editor, 10,000-character limit, multi-signature defaults, and image insertion options. support.google.com/mail/answer/8395
- Google Workspace Admin Help, “Set up Gmail compliance footers” — admin-enforced footer rules that append after user signatures at the server level. support.google.com/a/answer/2905869
- Google, “Send mail from a different address or alias” — send-as signature configuration, one signature per send-as identity. support.google.com/mail/answer/22370