Gmail search operators

Gmail subject: and from: search operators for precise inbox cleanup.

Use subject: when the phrase is in the email subject, from: when the sender matters, and combine both with date, unread, or in:anywhere operators when Gmail search needs to be exact.

subject:from:date rangessender cleanup
KeepKnown showing sender-based Gmail cleanup after precise search

Gmail search operators are fastest when you know exactly what you are looking for. Use subject: for words in the subject line, from: for a sender or domain, and add unread, date, or location operators when the result set is too broad.

Short answer

Use subject: for subject lines and from: for sender matching.

Search subject:invoice to find messages with invoice in the subject. Search from:amy@example.com or from:example.com to find mail from one sender or domain. Combine both when the sender and topic matter.

Useful Gmail searches for sender and subject cleanup.

Subject search

Use subject:security alert when Gmail should match the phrase in the subject line instead of the body.

Sender search

Use from:name@example.com for one sender, or from:example.com when a whole domain is the pattern you need to review.

Narrow the set

Add is:unread, in:anywhere, after:2026/01/01, before:2026/02/01, or has:attachment when the search is still too broad.

When search becomes a rule

Turn repeat searches into filters, but use contact screening for unknown senders.

Gmail can create filters from stable subject or sender searches. It still cannot express every sender not in my contacts. KeepKnown handles that sender-relationship rule by routing outsiders into KK:OUTSIDERS without deleting mail.

Questions before you connect.

How do I search Gmail by subject?

Use subject: followed by the word or quoted phrase you want in the subject line, such as subject:invoice or subject:security alert.

How do I search Gmail from a specific sender?

Use from: followed by the sender email address, name, or domain. For example, from:amy@example.com limits results to that sender.

Can I combine subject: and from: in Gmail?

Yes. A search such as from:example.com subject:invoice returns mail from that domain with invoice in the subject.

How do I include archived, Spam, or Trash messages?

Add in:anywhere to broaden the search across Gmail, including Spam and Trash, then combine it with subject:, from:, is:unread, or date operators.

Can Gmail filters use subject: and from: searches?

Yes. Run the search, choose Create filter, and select actions for future matching mail. Use KeepKnown when the real rule is contact-based rather than phrase-based.

Related inbox workflows

Gmail search cleanup

Find outsider sender patterns before they become another filter chore.