Gmail attachment search

Gmail Search Attachments

Find messages with attachments, search a filename or extension, and combine file filters with sender, date, size, archive, and unread status.

Interactive Gmail search builder

Build a Gmail attachment search

Attachment search is enabled by default. Add a file type, filename, sender, size, or date to reduce the results.

Private · runs in your browser
Start with a recipe:
Current queryYour query will appear here
People and subject
Words to include or exclude
Date and age
Mailbox location and status
Attachments and size
Results update as you type.
Direct answer

Gmail search attachments with has:attachment

Use has:attachment to find Gmail messages with attached files. Add filename:pdf to find PDFs, filename:xlsx for Excel files, or a complete filename when you remember it.

Combine the file filter with from:, after:, older_than:, or larger: to locate a specific document. The builder makes the combined query visible before you run it.

Step by step

Find a file attached to Gmail

1

Require an attachment

Keep Has an attachment selected so Gmail excludes messages without conventional attachments.

2

Describe the file

Enter an extension such as pdf, a partial filename, or an exact filename. Add a size threshold when the file was large.

3

Add message context

Use the sender, date, subject, archive, or unread status to distinguish the file from similar attachments.

Working examples

Gmail attachment search examples

Replace the extension, sender, and date with what you know about the missing file.

Search by filename or file extension

The filename: operator can match an extension or a filename. An extension is useful when you know the document format but not its name. A more specific filename reduces unrelated results, though renamed files will not match the old name.

Attachment indexing can also match file-related text in ways that differ by format. If a complete filename fails, try only the distinctive word or extension, then narrow the messages with sender and date.

Combine attachment, sender, date, and size

File searches are strongest when paired with message context. A query such as from:[email protected] filename:pdf newer_than:6m looks for recent PDFs from one vendor. Add larger:5M when the missing file was substantial.

Gmail’s size filters apply to the complete message, so a 5 MB threshold is not a guarantee that the individual attachment is 5 MB. Treat it as another way to rank the likely messages.

Inputs and output

What this Gmail search tool supports

Search inputs

Use sender and recipient addresses, subject text, included words, an exact phrase, and comma-separated exclusions. Blank fields remain outside the query, so you can work with incomplete information.

Mailbox filters

Combine a fixed date range or rolling message age with read status, mailbox location, Gmail category, attachment presence, filename, and complete-message size limits.

Readable output

The result is standard query text for Gmail’s search box. InboxQuery also describes each fragment, flags conflicting boundaries, offers one-click copying, and creates a direct Gmail search link.

Reliable workflow

How to refine a Gmail search without losing the target

Begin with the condition you know is true. That may be a sender address, a broad date window, an attachment type, or a mailbox location. Run that simple query first. When the result contains the target but is too large, add one more condition. This incremental method is easier to debug than starting with a long query made from several uncertain memories.

If a query returns nothing, remove the condition you trust least. Display names can hide a different sender address, subject wording may not be exact, categories can be assigned unexpectedly, and date boundaries can exclude messages near midnight. Switching to in:anywhere is useful when Spam or Trash may contain the message, but it does not search another account or restore permanently deleted mail.

The builder handles empty, valid, and invalid states without contacting Gmail. A blank form shows a clear empty result. A valid combination enables copy and search actions. Reversed date boundaries, non-positive age values, and an impossible size band display an error and disable the actions until the input is corrected. Gmail—not InboxQuery—decides which existing messages match the finished query.

Copying the query is useful when you want to inspect or edit it in Gmail before searching. The direct link is faster when the generated text already matches your intent. Both actions use the same visible query, and neither grants InboxQuery permission to your account. Rolling age filters change over time, while fixed dates continue to describe the same period.

Limits and troubleshooting

Why an attachment may be missing

Practical note

Confirm files found with Gmail search attachments

A Gmail search attachments result identifies matching messages, not a verified file inventory. Open the message and confirm the attachment name, version, sender, and date before downloading or forwarding it. Similar reports are often sent repeatedly with small filename changes. When version accuracy matters, combine a file extension with a sender and a narrow date window, then compare the message context rather than assuming the newest-looking filename is authoritative.

Related tools

Continue refining your Gmail search

FAQ

Gmail attachment search FAQ

How do I find all emails with attachments?

Search has:attachment in Gmail. Add another condition if the result is too broad.

How do I search Gmail for PDF attachments?

Use filename:pdf, commonly together with has:attachment.

Can Gmail search a specific attachment name?

Yes. Use filename: followed by the name, for example filename:report.xlsx.

Do Google Drive links count as attachments?

Not always. A Drive link can be represented differently from a conventional uploaded attachment, so also search the message words or sender.

Operator syntax is based on Google’s official Gmail search documentation. InboxQuery is independent and does not access your account.

Query copied to clipboard