Gmail search builder

Fill in what you remember about the email. The builder writes the search, says in plain words what it will find, and you paste it into the Gmail search box.

People
Words
Attachments and size
When
Where and status

Paste this into the Gmail search box

from:billing@example.com invoice has:attachment filename:pdf after:2026/01/01

Finds emails sent by billing@example.com, mentioning "invoice", that have an attachment, image, Drive file or YouTube link, with a pdf attachment, received after 2026-01-01.

Searches worth keeping

  • has:attachment larger:10M older_than:1y finds old emails with big attachments, a good place to start when Gmail says your storage is nearly full.
  • from:billing@example.com filename:pdf after:2026/01/01 pulls every PDF a supplier has sent this year.
  • is:unread category:updates shows unread notifications you can archive in one go.
  • in:anywhere "order 4417" looks in Spam and Trash too, for the email you're sure arrived.

How do I turn a search into a filter?

Google's steps: in the search box at the top, click Show search options, enter your criteria, click Create filter at the bottom, choose what the filter should do, then click Create filter again. Run the search first and check the results are the emails you mean before you save it as a filter.

What do "from" and "to" match?

Google describes to: as emails "sent to a specific person", so it matches mail sent to that address by anyone, not only mail you sent. Use from:me to:amy@example.com for just your own. Several names in one field become Gmail's "any of these" form, {from:amy from:david}.

How was this builder checked?

Every operator it writes is on Google's own list, Search operators you can use with Gmail, checked on November 17, 2026. Tests confirm the output for each field. The searches haven't been run in a live Gmail account. One detail isn't covered by Google's list: how to search a label whose name has spaces. The builder writes the spaces as hyphens. If a label search finds nothing, click the label in Gmail's sidebar and copy what appears in the search box instead.

Esc