I'd like to see how a certain email was put together.

Is there a "View Source" for emails sent to Gmail?

  • Cant you just "view source" in the browser?
    – jtheman
    Oct 30 '12 at 20:20
  • 2
    This belongs on SuperUser, but yes, "show original" after clicking on the arrow top-right
    – Jasper
    Oct 30 '12 at 20:20
  • see my answer below.
    – bibscy
    May 16 '18 at 12:21

As Jasper pointed out, click the dropdown menu next to the reply button, and select Show original.

Show original

  • 7
    When I do that, I only see the base64 encoding of the source. Oct 5 '15 at 15:24

Once you get your Show original window up, your address bar will contain something like this: https://mail.google.com/mail/u/0/?ui=2&ik=1234567890&view=om&th=1234abcd1234abcd

Just change the bit that says view=om to view=lg.

Push Enter, and bingo: it’s no longer plain text. Now save it as .html or as .pdf.

Source: http://blog.brush.co.nz/2012/09/save-a-gmail-message-to-hard-disk/

  • 1
    If anyone else has the problem where every new line is terminated by an = sign, then this fixes that problem.
    – Harry12345
    Dec 17 '19 at 11:19
  • Wow, so hacky. Thanks, it worked! Jul 30 '20 at 21:03
  • Beware: images might be broken! Instead of https://your-website.com/image.png they'll be https://ci4.googleusercontent.com/proxy/j78=s0-d-e1-ft#https://your-website.com/image.png. If your website is intranet-only (i.e. inaccessible from outside your company network / without VPN), you won't see the images since Gmail image proxy servers are unable to reach it. When using desktop email client, images will be shown.
    – izogfif
    Jan 21 '21 at 9:19

To add to the accepted answer:

If after pressing "View Original" you don't see the HTML code and only see big chunks of random text (Base64) then what you want to do is select the text under the

Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64

label and copy paste it into a Base64 Decoder (You can find a range of tools that do this online via Google). The results are your HTML source.


Select Print email and it will open the link in a new window or tab, where you can right click see all the source code.

  • I think you're thinking of "Show original".
    – ale
    May 13 '16 at 11:57
  • 2
    This is all some odd herd mentality that's downvoting this post. Selecting "print" brings up a considerably less fettered view of the email. From there, view source is much easier to use, as you don't have to contend with all the html from the gmail interface.
    – matty
    Sep 13 '16 at 6:33
  • This worked for me. Thanks @ki8asui
    – Gokul
    Mar 27 '18 at 10:53

Don't know the web client of Gmail, but some way to go would be to configure different email client (e.g. Thunderbird with imap a few clicks...) where you can easily view the source of the message.

  • Incorrect answer.
    – Folk
    Nov 10 '16 at 21:00

I had to actually do show original, and then do view source to see the source HTML.

  • 1
    Why? Didn't you see the email's source when you did Show original? Apr 29 '14 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.