View the Source of a Message in Gmail

Girl with magnifying glass
John Rensten/Getty Images

An email you see in Gmail is not really what the actual original email looks like, at least, not the one that the email program interprets when it receives it. Instead, there's a hidden source code that you can peer into to see some additional information not included in the regular message.

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

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. 

How to View the Source Code of a Gmail Message

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

  2. Locate the top of the email where the subject, sender details, and timestamp are located. Right next to that is the reply button and then a small down arrow - click that arrow to see a new menu.

  3. Select Show original from that menu to open a new tab displaying the email's source code.

To download the original message as a TXT file, you can use the Download Original button. Or, hit Copy to clipboard to copy all the text so that you can paste it anywhere you like.

How to View the Source Code of an Inbox Email

If you're using Inbox by Gmail instead, follow these steps:

  1. Open the email.

  2. Find the three-dotted stacked menu button on the upper right-hand side of the message. Take note that there are two of these buttons but the one you're looking for is at the very top of the message itself, not the menu above the message. In other words, open the one that's located right next to the date of the email.

  3. Choose Show original to open the source code in a new tab.

Much like in Gmail, you can download the full message to your computer as a text document or copy the contents to the clipboard.