Toolvito

Works on this device

Email Preheader Checker

The preheader is the short text that many mail programs show after the subject line in the list of messages. Type a preheader to count it and to see what is left of it at a number of lengths. Or paste the HTML of an email to find its hidden preheader and the text that a mail program would most likely show first.

Your preheader

Counts the preheader and shows what is left of it at each length.

Your values

Optional. With the subject, the page also says if the preheader repeats it.

Lengths to check

How many characters of the preheader show after the subject. The numbers the page starts with are examples, not rules of any mail program.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Type a preheader or paste the HTML, or choose Try an example.

How to use the checker

  1. Choose what you want to do: check a preheader text, find the preheader in the HTML of an email, or write a hidden preheader block.
  2. Type the preheader, or paste the HTML source of the message. You can add the subject line to see if the preheader repeats it.
  3. Look at Lengths to check. Each row is a place where the preheader is shown and the number of characters that fit there. Change the numbers to what you see in the mail programs your readers use.
  4. Choose Check. The table shows, for each length, the text that is left and what happens to the rest.

Where the preview text comes from

A mail program does not get the preheader as a field of its own. It takes the first text it finds in the message and shows as much of it as fits after the subject. Text that the HTML hides is taken too, as long as it stands first in the source.

So a preheader is made in one of two ways. Either the first visible words of the message are written to work as a preview, or a hidden block with the preheader text is put right after the <body> tag. Many email tools have a field for the preheader and write that block for you.

When the preheader is shorter than the room for it, the mail program goes on with the next text of the message. That is often "View in browser" or a menu. To stop that, templates put padding after the preheader: a run of characters with no width and no-break spaces.

What the HTML check reads

  • Hidden preheader: the text at the start of the message that the HTML hides, up to the first text that a reader sees.
  • Hidden means that the tag of an element, or of an element around it, has the hidden attribute or one of these styles: display: none, visibility: hidden, opacity: 0, max-height: 0, a font size of 0 or 1 pixel, or a height or width of 0 with overflow: hidden.
  • Padding characters: soft hyphens, zero-width spaces, zero-width non-joiners, word joiners and combining grapheme joiners in that hidden text, and the no-break spaces after its last real character.
  • The preview: all text of the message in the order of the source, hidden or not, with every run of spaces as one space. The table shows its first characters at each length.
  • Left out: the head of the page, scripts, styles, comments and the alt text of images.

Worked example

The preheader Tulips, daffodils and crocus are back in stock. Free delivery this week. has 72 characters, 61 without spaces, and 12 words. With the subject Spring sale: 20% off all bulbs (30 characters) the two together have 103 characters. At a length of 40 the preheader is cut to Tulips, daffodils and crocus are back in… and 32 characters do not show. At 90 it fits and 18 characters of room are left.

The example HTML on this page starts with a block that has display:none. It holds Tulips, daffodils and crocus are back in stock. and six pairs of padding. The check finds a hidden preheader of 47 characters and 8 words with 12 padding characters. At a length of 40, 7 characters of the preheader do not show. At 90 the whole preheader shows, and after the padding the preview goes on with View this email in your browser, so the padding is too short for that length.

Limits you should know

  • Mail programs build the preview in their own ways and change them over time. This page uses one plain rule and names it. Send a test message to yourself and look at it in the programs your readers use.
  • The lengths the page starts with are examples and not rules of any mail program. How much shows depends on the program, the device, the width of the window and the length of the subject.
  • Only the tag of an element is read to see if it hides its content. A rule in a <style> block is not applied, so text that only such a rule hides is read as visible text.
  • The alt text of an image is left out. Some mail programs put it into the preview, and the result says so when an image with alt text stands before the first text.
  • Text inside comments is not read, also the comments that only Outlook reads.
  • A character with no width has no place of its own in the count: it goes with the character before it. So a pair of padding counts as one character of room.
  • The page gives no score and makes no claim about spam filters, open rates or delivery.
  • For the subject line, use the Email Subject Length Checker.

Related tools