·Dioveo Team· 10 min read

How to Find Attachments in Gmail + Free Search Builder

Gmail
Attachments
Search
Productivity
Tips
How to Find Attachments in Gmail + Free Search Builder

To find attachments in Gmail, enter has:attachment in the search bar. Add filename:pdf for PDFs, from: for a sender, or a date filter to narrow the results. Gmail returns the matching messages; open a message to view or download its files.

Copy one of the searches below, or use the free builder to combine your own filters. The manual builder needs no sign-up and does not connect to your mailbox. Prefer plain English? Use the natural-language Gmail query converter.

Quick Reference: Most Useful Gmail Attachment Search Operators#

Paste a complete query into Gmail, then replace the example sender or dates where needed.

Find these messagesCopy this Gmail search
Any attachmenthas:attachment
PDF fileshas:attachment filename:pdf
JPG or PNG imageshas:attachment {filename:jpg filename:png}
Excel spreadsheetshas:attachment filename:xlsx
Files from one senderhas:attachment from:[email protected]
Attachments from the last 30 dayshas:attachment newer_than:30d
PDFs before January 1, 2026has:attachment filename:pdf before:2026/01/01
Messages larger than 10 MB with attachmentshas:attachment larger:10M
Attachments you sentin:sent has:attachment
Attachments including Spam and Trashin:anywhere has:attachment

The size filter measures the whole email, not an individual attachment. Regular Gmail searches exclude Spam and Trash; add in:anywhere to include them. See Google's search-operator reference for the supported operators.

Gmail search query builder

Pick your filters and get a ready-to-use query. Copy it, or open it straight in Gmail.

Free, no sign-up. These manual filters do not connect to your mailbox.

Popular searches

After
Before
File types (pick any)
Message size
has:attachment
Open in Gmail

Operators find emails; they can't hand you the files. When you need the results as actual documents, Dioveo searches every attachment you've ever received and downloads them in bulk.

Why Gmail Search Feels Broken (And How to Fix It)#

A keyword such as "invoice" can match the email as well as the file you want. Attachment operators narrow the search: combine a filename or type with a sender and date instead of relying on a broad keyword alone.

The Foundation: Finding Emails with Attachments#

The simplest operator for attachment search is has:attachment. Add it to any Gmail search and your results will only show emails that include attached files.

has:attachment

That single operator cuts out all the noise. From here, you layer on additional filters to zero in on exactly what you need.

Searching Gmail Attachments by File Type#

Gmail lets you find attachments by name or file extension using the filename: operator. You can search by extension or by the actual filename if you know it.

Search by file extension

To find all PDFs in your inbox:

has:attachment filename:pdf

For Excel files:

has:attachment filename:xlsx

For Word documents:

has:attachment filename:docx

For images:

has:attachment filename:jpg

or

has:attachment filename:png

Searching is only half the job. If you want the pictures themselves saved as files rather than a list of emails to click through, see how to download every photo from Gmail.

For ZIP archives:

has:attachment filename:zip

For CSV files (common for data exports and reports):

has:attachment filename:csv

Search by partial filename

If you remember part of the filename, you can include it directly. Gmail does partial matching, so searching for:

filename:invoice

...will surface any attachment with "invoice" in the filename, regardless of extension. Pair it with has:attachment for cleaner results:

has:attachment filename:invoice

Search by exact filename

If you know the exact name of the file, wrap it in quotes:

filename:"Q1 2026 Report.pdf"

This is useful when someone sends multiple versions of the same document and you need a specific one.

Searching Gmail Attachments by Date#

Date filtering is one of the most useful ways to narrow down attachment searches. Gmail supports both absolute and relative date operators.

Using after: and before:

These operators accept dates in YYYY/MM/DD format.

To find attachments sent after January 1, 2026:

has:attachment after:2026/01/01

To find attachments sent before March 1, 2026:

has:attachment before:2026/03/01

To find attachments within a specific range:

has:attachment after:2026/01/01 before:2026/02/01

This is perfect when you're looking for something you know arrived during a particular month or quarter.

Using older_than: and newer_than:

These operators work with relative time periods, which is convenient when you don't want to type specific dates.

Supported units: d (days), m (months), y (years).

Find attachments received in the last 30 days:

has:attachment newer_than:30d

Find attachments older than one year:

has:attachment older_than:1y

Find PDFs received in the past three months:

has:attachment filename:pdf newer_than:3m

Searching Gmail Attachments by Sender#

When you need to find attachments from a specific person or organization, the from: operator does exactly what you'd expect.

Search by email address

has:attachment from:[email protected]

Search by name

Gmail also searches by display name, so if you don't know someone's email address:

has:attachment from:"John Smith"

Search by domain

To find all attachments from anyone at a particular company:

has:attachment from:@company.com

This is especially useful for finding documents from vendors, clients, or service providers when you receive email from multiple people at the same organization.

The real power comes from combining operators. Gmail evaluates multiple operators as AND conditions by default, so every filter you add narrows the results further.

Example: PDFs from a specific sender this year

has:attachment filename:pdf from:[email protected] after:2026/01/01

Example: Spreadsheets from a client in Q4 2025

has:attachment filename:xlsx from:@clientdomain.com after:2025/10/01 before:2026/01/01

Example: Any contract sent by a colleague last month

has:attachment filename:contract from:[email protected] newer_than:1m

Example: Large attachments from anyone

Gmail has a size: operator that accepts bytes. To find messages larger than 5 MB that contain attachments:

has:attachment size:5000000

Or use larger: for a cleaner syntax:

has:attachment larger:5M

Searching Within Specific Folders and Labels#

Regular Gmail searches include archived and sent messages but exclude Spam and Trash. Add in:anywhere to include those locations, or restrict the search to a specific label or mailbox.

Search only in your inbox

in:inbox has:attachment filename:pdf

Search a specific label

If you use labels to organize email, include the label name:

label:clients has:attachment newer_than:6m

Include Spam and Trash

in:anywhere has:attachment filename:docx

Use this when a file may be attached to a message in Spam or Trash. It cannot retrieve a permanently deleted message.

Using OR Logic for Multiple File Types#

By default, Gmail treats multiple operators as AND. To search for attachments that match any of several criteria, use the OR keyword (capitalized) or curly braces.

Find emails with either PDF or Word document attachments:

has:attachment {filename:pdf filename:docx}

Or written out explicitly:

has:attachment filename:pdf OR has:attachment filename:docx

Find attachments from either of two senders:

has:attachment {from:[email protected] from:[email protected]}

Searching for Attachments You Sent#

An unrestricted attachment search can include both received and sent mail. Add in:sent to limit it to messages you sent, and use to: when you want a particular recipient.

Find all emails you sent that included attachments:

in:sent has:attachment

Find large files you sent to a specific client:

in:sent has:attachment to:[email protected] larger:2M

This is useful for confirming that you actually sent something, or for finding a file you sent months ago and need to reference again.

Advanced Tip: Combining Subject Keywords#

Sometimes you remember a word from the email subject but not the filename. Use subject: to add that context.

has:attachment subject:invoice filename:pdf from:[email protected]

Or if you remember a word that appeared in the email body:

has:attachment "quarterly report" filename:xlsx

Unquoted terms search both subject and body. Quoted phrases search for exact matches.

Saving Searches for Repeated Use#

If you run the same attachment search regularly, there are a few ways to save time.

Create a filter: In Gmail, go to Settings, then Filters and Blocked Addresses. You can create a filter based on your search criteria and have Gmail automatically label, star, or forward those messages.

Bookmark the search URL: After running a search in Gmail, the URL contains your query. Bookmark it in your browser and you can re-run the same search with one click.

Use keyboard shortcuts: Gmail's keyboard shortcut / focuses the search bar. Type your operator and hit Enter. You can get to any search in under five seconds once you've memorized a few operators.

See Every Gmail Attachment in One Place#

Operators find attachments one search at a time. If what you want is an overview of everything you have, three approaches help.

Use the advanced search panel. Click the filter icon on the right side of Gmail's search bar, tick "Has attachment," and fill in sender, date range, or size. It builds the operator query for you, which is handy when you don't remember the syntax.

Auto-label everything with an attachment. In Settings, under Filters and Blocked Addresses, create a filter with the "Has attachment" box checked and apply a label such as "Has Attachment" (tick "Also apply filter to matching conversations" to cover your history). From then on, one click on that label shows every email carrying a file.

Browse files instead of emails. Even with labels and operators, Gmail always shows you messages, never a file library. A tool like Dioveo's attachment search indexes your entire history and shows the files themselves in one filterable view: every PDF, image, and spreadsheet across years of email, ready to preview or download in bulk.

Gmail's search operators are powerful, but they have some friction points:

No bulk download. You can find all your PDF attachments from last quarter, but Gmail gives you no way to download all those attachments at once. You'd have to open each email and save each attachment manually.

No folder organization within Gmail. Labels help, but they're applied to messages, not to attachments themselves. There's no built-in way to view all your attachments in a folder hierarchy.

No documented attachment-content-only operator. A keyword search can return a message without making clear where the match occurred. Narrow by sender, filename or date, then open the attachment and search within its viewer to confirm the text you need.

Storage still fills up. Searching does not free space by itself. Gmail lets you select and delete matching messages in bulk, but this also removes their attachments. Save any files you need before finding and deleting large messages.

This is where dedicated tools become useful.

How Dioveo Extends Gmail Attachment Management#

Dioveo is built specifically for Gmail attachment management. Where Gmail's search helps you find attachments, Dioveo helps you act on them at scale.

With Dioveo, you can automatically save the ones you find to Drive based on rules you define: sender, subject keywords, filename, or file type. Every PDF from your accountant can go straight to a designated Drive folder. Every spreadsheet from your team can be organized by project without you lifting a finger.

It also keeps files safe outside Gmail. Dioveo syncs attachments to Google Drive, Dropbox, or OneDrive and can check for new files every 6 hours, and connecting Gmail to Google Drive takes a couple of minutes. If that is the part you came for, the full walkthrough covers every way to save Gmail attachments to OneDrive or Dropbox.

If you spend any meaningful time each week searching for, downloading, or organizing Gmail attachments, Dioveo removes most of that friction. You can start with the free plan at dioveo.com and automate your first workflow in a few minutes.

Frequently Asked Questions#

How do I search Gmail for emails with attachments?

Type has:attachment into the Gmail search bar. That single operator filters your results down to only messages that include an attached file. From there you can layer on other operators (from:, filename:, after:, larger:) to narrow further.

Can I search Gmail attachments by file type?

Yes. Use the filename: operator with an extension, for example has:attachment filename:pdf for PDFs, filename:xlsx for Excel files, or filename:jpg for images. You can also do partial matches like filename:invoice to find any attachment with "invoice" in its name, or wrap an exact name in quotes such as filename:"Q1 2026 Report.pdf".

How do I find large attachments in Gmail?

Combine has:attachment with a size operator. has:attachment larger:5M finds messages larger than 5 MB that contain attachments. The size is for the entire message, not each file. Raise the threshold to larger:10M or larger:25M to narrow the results, then inspect the attachments in each message.

Can I search inside the content of an attachment?

Google does not document an operator that restricts a search to attachment contents alone. Use a keyword together with sender, filename or date filters to narrow the messages, then open the candidate file and search within its viewer to confirm the text.

Can I see all Gmail attachments at once without opening each email?

Not inside Gmail. The closest you get is has:attachment, which lists the emails carrying files, one message at a time. For a true all-files-in-one-view experience you need a tool like Dioveo that indexes your mailbox and shows the attachments themselves, filterable by sender, date, and type.

Why does Gmail say "has attachment" but I cannot see the file?

The attachment may be inline (embedded in the message body rather than downloadable), or it may be a Google Drive link rather than a true attachment. Drive links live in Drive, not in the email, so they don't show up as files you can save from the message.

Conclusion#

Gmail's search operators turn what feels like hunting through a haystack into a precise, repeatable process. Once you learn the core operators, has:attachment, filename:, from:, after:, before:, and larger:, you can find almost any attachment in your inbox within seconds.

The real efficiency gains come from combining them. A single search query can surface every PDF from your accountant sent in the past six months, or every large attachment from a client in a specific quarter, without any scrolling.

For teams or individuals who deal with high attachment volume, manual search is just the starting point. Automating how attachments are saved, organized, and cleaned up takes things further. Try Dioveo free and see how automated attachment workflows can save you hours each month.

Stop managing attachments by hand

Dioveo finds every attachment in your Gmail, lets you search and download them in bulk, and auto-saves new ones to Google Drive, Dropbox, or OneDrive.

CASA Tier 2 certified GDPR compliant Permanent Free plan Cancel anytime

Keep reading