Use Gmail's search box to find emails by sender, subject, date, or keyword

The fastest way to find an old email in Gmail is the search box at the top of your inbox. Type what you remember about the message — a person's name, a word from the subject line, or a phrase from the body — and Gmail searches through all your mail, including archived and deleted messages (unless you permanently deleted them). You can search across years of email in seconds.

Gmail also lets you narrow your search using specific filters. Instead of typing a general phrase, you can tell Gmail exactly what to look for: emails from a particular person, messages sent on a certain date, or mail with attachments. These filters work together, so you can search for emails from your boss in March that mention "budget" and have a PDF attached.

Key Takeaways

  • The search box at the top of Gmail finds messages by keyword, sender name, subject line, or any text in the email body across all folders.
  • You can combine filters like sender, date range, and attachment type to narrow results when a broad search returns too many messages.
  • Emails you archive stay searchable and do not disappear — archiving just removes them from your inbox view.
  • Permanently deleted emails (emptied from Trash) cannot be recovered, but emails in your Trash folder remain searchable for 30 days.
  • Gmail's search operators like "from:", "subject:", and "has:attachment" let you build precise searches without clicking through menus.

Search by sender name or email address

To find all emails from one person, type from:name@example.com in the search box, replacing the address with the actual email. Gmail shows every message that person sent you, going back to the beginning of your account. You can also type just a first or last name — from:Sarah — and Gmail finds messages from anyone with that name in your contacts or recent mail.

If you remember only part of someone's email address, type what you know. For example, from:sarah@ finds all messages from any Sarah at any domain. This works when you are not sure whether someone used Gmail, their company email, or an old account.

Search by subject line or specific words

Use subject:word to search only the subject line of emails. Type subject:invoice to find every message with "invoice" in the subject, which is faster than searching the whole email when you know the topic. You can combine this with other filters — subject:invoice from:accounting@company.com finds invoices from your accounting department specifically.

For a general keyword search, just type the word in the search box without any prefix. Gmail searches the subject line, body, and sender name all at once. Type contract and you get every email mentioning contracts, whether in the subject, the message text, or even in an attachment.

Search by date or date range

To find emails from a specific time period, use before:, after:, or both together. Type after:2023/01/15 to find all emails sent after January 15, 2023. Type before:2023/12/31 to find emails before the end of that year. Combine them: after:2023/01/01 before:2023/12/31 finds everything from 2023.

Gmail also understands relative dates. Type after:2024/01/01 or use newer_than:2y to find emails from the last two years. The format is always year/month/day, and Gmail searches from midnight on that date.

Search for emails with attachments or specific file types

Use has:attachment to find any email with a file attached. This is useful when you remember receiving a document but not who sent it or when. You can narrow further by file type: filename:pdf finds emails with PDF attachments, filename:xlsx finds spreadsheets, and filename:docx finds Word documents.

Combine attachment searches with other filters. Type from:manager@company.com has:attachment to find every email from your manager that included a file. Type subject:report filename:pdf after:2024/01/01 to find PDF reports sent to you this year.

Use the advanced search menu for complex searches

If typing search operators feels awkward, click the search box and then click the small arrow or settings icon next to it (the exact location varies by device and Gmail version). A menu opens with fields for sender, subject, date range, and attachment type. Fill in what you remember and click Search. Gmail builds the search command for you behind the scenes.

The advanced menu also includes options to search only unread mail, only starred messages, or only mail in a specific folder. Use these when you remember whether you marked the email as important or filed it somewhere other than your inbox.

Understand where Gmail searches and what it cannot find

Gmail searches your inbox, sent mail, drafts, all custom labels and folders, and archived messages. Emails you archive do not disappear — they stay in your account and remain searchable; archiving just hides them from your inbox view. Emails in your Trash folder are searchable for 30 days after you delete them. After 30 days, they are permanently removed and cannot be found.

Gmail cannot search inside attachments on older accounts, though newer accounts have this feature. If you remember a word from inside a PDF or Word document, the search may not find it. You may need to read the attachment and search it separately using your computer's file search tool.

Frequently Asked Questions

Can I search for emails I permanently deleted?

No. Once you empty your Trash folder, those emails are gone forever and cannot be recovered or searched. Emails in Trash remain searchable for 30 days before Gmail permanently deletes them. If you think you deleted something important, check your Trash folder right away.

How do I search for emails with no subject line?

Type subject: (with nothing after the colon) to find emails with a blank subject line. This is useful when you remember receiving a message that had no title, or when you want to clean up emails that are missing subject information.

Can I search for emails sent to a specific person?

Yes, use to:name@example.com to find emails you sent to that person. This searches your Sent folder. You can also use cc:person@example.com or bcc:person@example.com to find messages where someone was copied or blind-copied.

What if my search returns thousands of results?

Add more filters to narrow down. Combine sender, date range, and keywords: from:john@company.com subject:meeting after:2024/06/01. Start with the most specific detail you remember, then add filters one at a time until the results are manageable.

Does Gmail search work the same way on my phone?

Yes. Tap the search box at the top of Gmail on your phone and type your search term or use the filters menu. The search operators (from:, subject:, has:attachment) work the same way on mobile as they do on a computer.