Where the IP address lives in your email

The IP address of the person who sent you an email is stored in the email's header — the technical information that sits above the message itself, usually hidden from view. Your email program keeps this data but does not show it by default, the same way your web browser keeps the server address of a website but does not print it on the page. To see the IP address, you have to open the full header and read through lines of routing information until you find the one labeled "Received" that shows the sender's connection point.

The header contains a chain of "Received" lines, each one marking a server the email passed through on its way to you. The first "Received" line in the chain — the one closest to the top — shows where the email originated. That line will include an IP address in square brackets, like [192.168.1.1], or sometimes written as a domain name that you can look up separately. Different email services format this information slightly differently, but the principle is the same across Gmail, Outlook, Yahoo, and most others.

Key Takeaways

  • The sender's IP address appears in the email header under the topmost "Received" line, not in the message body itself.
  • Gmail, Outlook, and Yahoo all hide headers by default — you must open a menu to view the full header or source code.
  • The IP address appears in square brackets or as a domain name; if it is a domain, you can use a reverse DNS lookup to find the IP.
  • An IP address alone does not identify a person — it identifies the network connection they used, which may be shared by many users.
  • If you need to report a phishing or fraud email, your email provider's abuse team can trace the IP more thoroughly than you can.

How to view the full header in Gmail

Open the email you want to check. In the top right corner of the message, click the three vertical dots (the menu icon). A dropdown menu will appear. Click "Show original" — this opens a new tab with the complete email source code, including all headers.

In the new tab, look for the section labeled "Received:" near the top. You will see multiple "Received:" lines stacked together. The very first one — the topmost line — is the one you need. Scan that line for text in square brackets that looks like an IP address: four numbers separated by periods, such as [203.0.113.45]. That is the sender's IP address. If you see a domain name instead of numbers, you can copy that domain and search it in a reverse DNS lookup tool to find the IP.

How to view the full header in Outlook

Open the email. At the top of the message, look for "Message" in the ribbon menu. Click it, then find and click "Actions" (or "More actions" if you are using Outlook online). A menu will drop down. Select "View message details" or "View message source" depending on your version.

A new window or panel will open showing the raw email code. Scroll to the top and find the "Received:" lines. The first one contains the sender's information. Look for the IP address in square brackets — it will be near the beginning of that first "Received:" line. Copy the IP address (the numbers only, without the brackets) if you need to record it.

How to view the full header in Yahoo Mail

Open the email. Click the three dots menu in the top right corner of the message. Select "View raw message" or "View full headers" — the exact wording depends on your version of Yahoo Mail.

A new window will open showing all the email code. Look at the top section for "Received:" lines. The topmost "Received:" line is what you need. The sender's IP address will appear in square brackets somewhere in that line. If you see only a domain name, note it down and use a reverse DNS tool to convert it to an IP address.

What to do with an IP address once you have it

An IP address by itself tells you which network connection sent the email, but not who the person is. The IP belongs to an Internet Service Provider (ISP) or a company's network, and many people may share the same IP address. If you want to know more about where the IP is located, you can use a free IP lookup tool — search "IP lookup" in any search engine and paste the IP into the tool. It will show you the city and country associated with that IP, though the location is often approximate.

If the email is phishing, fraud, or harassment, do not try to investigate further on your own. Instead, report it to your email provider's abuse team. Gmail, Outlook, and Yahoo all have built-in reporting buttons in the email itself (usually marked "Report phishing" or "Report spam"). The provider's security team has access to much more detailed information than the header shows, and they can trace the email through their own servers and take action if needed.

Why the header shows a chain of IP addresses

When you send an email, it does not travel directly from your computer to the recipient. Instead, it hops through multiple mail servers — your email provider's server, possibly a relay server, and finally the recipient's email provider's server. Each server that touches the email adds its own "Received:" line to the header, creating a chain. The order matters: the topmost "Received:" line was added last (by the recipient's server), and the bottom line was added first (by your server).

This means you have to read the header from top to bottom, but use the topmost line. That line shows where the email came from before it reached the recipient's mail server. If you read the wrong line, you might end up with the IP address of Gmail's server or Outlook's server instead of the sender's actual connection point. The sender's IP is always in the first "Received:" line at the very top.

When the IP address is hidden or missing

Some emails do not show a clear IP address in the header. This happens when the sender used an email service that strips out that information for privacy, or when the email was sent through a proxy or VPN that masks the real IP. In these cases, the "Received:" line might show only a domain name, or it might show an IP that belongs to a large email service rather than an individual connection.

If you need to trace an email and the header does not give you enough information, your email provider is your best resource. Report the email through your provider's abuse or phishing report tool. They can see server logs and routing information that is not visible in the header, and they have the authority to investigate further if the email is malicious.

Frequently Asked Questions

Can I find out who sent an email just from the IP address?

No. An IP address shows which network connection was used, but not which person used it. Many people share the same IP address (everyone on a home WiFi network, everyone in an office building, or everyone using a public WiFi). To identify a person, law enforcement or the email provider would need additional information like account logs or payment records.

What if the email header shows multiple IP addresses?

That is normal. Each "Received:" line shows a different mail server the email passed through. The topmost line is the most recent server (the recipient's), and the bottom line is the original sender's. The sender's IP is in the first "Received:" line at the very top of the header.

Is it safe to look at an email header?

Yes. Viewing the header does not read anything or run any code. You are only reading text that was already part of the email. It is completely safe to open the full header or view the message source.

What is a reverse DNS lookup and how do I use it?

A reverse DNS lookup converts a domain name to an IP address. If your email header shows a domain name instead of an IP address, search "reverse DNS lookup" online, paste the domain into the tool, and it will return the IP. Many free tools do this — you do not need to read anything.

Should I contact the person at that IP address if I think they sent me spam?

No. Report the email to your email provider instead. The IP address belongs to an ISP or company network, not to an individual, and contacting them directly will not help. Your email provider has the tools and authority to investigate and take action.