How to use advanced search in Gmail
In Gmail on the web (verified 2026-10-24), click the slider / options icon in the search box to open Search options, or type operators such as from:[email protected] has:attachment newer_than:30d directly.
After a search works, open the same options panel and choose Create filter to automate labels, archives or deletions matching that query.
Applies to Gmail in the browser and most operators in the Gmail mobile search field. Google Workspace admins do not usually disable operators, but retention policies can still hide old mail.
Find mail with operators or the panel
Use the Search options panel
- Click the search box at the top of Gmail.
- Click the Show search options controls icon on the right of the box.
- Fill From, To, Subject, Date within, Has attachment, etc. > Search.
Type operators directly
- Examples:
from:[email protected],to:me,subject:"q3 budget". - Try
has:attachment filename:pdf,is:unread,newer_than:7d,older_than:1y. - Combine terms — spaces act like AND.
Save as a filter
- Run a search you like.
- Open Search options again > Create filter.
- Choose actions (Skip Inbox, Apply label, Delete) > Create filter.
Our take: operators first, filters second
Master five operators (from, to, has:attachment, newer_than, filename) before building a dozen filters. Filters are for mail you handle the same way every time.
If it fails
- Zero results: check spelling; try dropping date limits; search All Mail not just Inbox.
- Quotes too strict: remove quotes if the subject wording varies.
- Mobile missing panel: type operators in the search field instead.
- Need across chats/spam: use
in:anywherecarefully — it can include Spam/Trash.
Frequently asked questions
How do I open Gmail advanced search?
Click the options/sliders icon inside the Gmail search box to open Search options.
What are useful Gmail search operators?
from:, to:, subject:, has:attachment, filename:, newer_than:, older_than:, is:unread, label:.
Can I create a filter from a search?
Yes — Search options > Create filter after you define the criteria.
Does advanced search work in Gmail mobile?
Many operators work in the mobile search bar; the full options panel is easiest on the web.
How do I search only unread mail with attachments?
Try is:unread has:attachment (add from: or newer_than: as needed).