How to View the Source of a Message in Gmail

Discover the technical details behind your email messages

What to Know

  • Open message > select three dots > Show Original.
  • For desktop only. Viewing the full message source is not supported in the Gmail mobile app.

This article explains how to access the source code of a message in Gmail to view information not included in the email.

How to View the Source Code of a Gmail Message

The source code of the email shows the email header information and often the HTML code that controls how the message is displayed. This means you get to see when the message was received, the server that sent it, and lots more.

  1. Open the message for which you want to see the source code.

  2. Locate the top of the email where the subject, sender details, and timestamp are located. Next to that is the Reply icon and the three stacked dots for the menu. Select the three stacked dots icon to reveal the additional options.

    Gmail with the More menu highlighted
  3. Select Show original from that menu to open a new tab that displays the email's source code.

    The Gmail More menu with the Show Original command highlighted
  4. The original source code of the message opens in a new tab. At the top, you'll find vital details for the message and how it was sent. Below that is the plain text that was exchanged between email servers.

    Original message window in Gmail
  5. Email messages contain information that servers use to ensure that the message makes it to the correct place. You can use the browser's search function to find the beginning of the actual message. Because the message is HTML, it should begin with an HTML tag. Open the search with Ctrl+F. Then, search for DOCTYPE to go to the beginning of the message content.

    Original source example in Gmail
  6. To download the original message as a TXT file, select Download Original. Or, select Copy to clipboard to copy all the text so that you can paste it anywhere you like.

    The message source in Gmail with the Download Original and Copy to Clipboard options highlighted

You can view the full source code of an email only while using the desktop version of Gmail or Inbox. The mobile Gmail app does not support viewing the original message. 

Was this page helpful?