Skip to content
ToolsJune 6, 2026By dreamif.ai

Gmail search query builder

Build Gmail search syntax without memorizing operators. Choose senders, dates, attachments, unread status, excluded words, and more, then copy the exact query.

Build a Gmail search

Try an example
People
Content
Filters
Gmail query

When a built query beats manual search

Gmail's search bar is fast when you remember the exact words in a thread. Operators help when you know the shape of the email but not the phrase: who sent it, when it arrived, whether it had a PDF, or which folder might contain it.

Before a call

Find every attachment from a client.

Billing cleanup

Pull old invoices or contracts without opening every billing thread.

Inbox triage

Find unread mail from several people at once.

Missing thread

Search archived, spam, and trash when normal inbox search misses it.

Account handoff

Build repeatable searches for cleanup work or follow-up review.

The builder does not read your mailbox. It creates the search text, then Gmail runs the query after you paste it or open the generated URL.

Gmail operators this builds

The builder covers common Gmail search operators: from:, to:, subject:, after:, before:, older_than:, newer_than:, has:attachment, exclusions, and grouped senders.

The operator set follows Google's Gmail search operator documentation.

Common recipes

A few search patterns that come up often. Copy them straight into Gmail, or rebuild them in the tool above to tweak the values.

  • Every attachment from one sender, older than a year: from:amy@example.com has:attachment older_than:1y
  • Unread mail from any of two people: {from:amy@example.com from:david@example.com} is:unread
  • Invoices that are PDFs but not internal drafts: filename:pdf invoice -subject:draft
  • Anything you sent containing a follow-up phrase: from:me "following up"
  • Large attachments hiding in any folder, including spam and trash: has:attachment larger:10M in:anywhere
  • Mail in a specific window: after:2026/01/01 before:2026/02/01

Tips that aren't obvious

This builds a search string you can paste into Gmail. It does not connect to your account, run the search, or change anything in your mailbox.

  • Multiple senders need brace syntax. Comma-separating from: values does not work; the builder rewrites them as {from:a@example.com from:b@example.com} automatically.
  • older_than: is relative to today, while before: is an absolute date. Use the relative form for evergreen searches you save.
  • Excluding a phrase is a leading dash: -subject:newsletter or -receipt. Multi-word phrases need quotes.
  • Gmail search ignores common words and punctuation. If a query feels too loose, add a quoted phrase like "thank you" to anchor it.
  • To include archived, spam, and trash in the same search, turn on All mail — it adds in:anywhere, which most other operators silently exclude.
dreamif.ai
Explore

Related resources

Questions, answered.

Yes. It runs in your browser and does not require a dreamif.ai account.

Email that keeps moving.