Gmail Search Operators: The Complete Cheat Sheet
TL;DR
- Gmail search operators are keywords like category:, older_than:, has:attachment, from:, larger: and label: that narrow your inbox to exactly the emails you want.
- Type them directly into the Gmail search bar, alone or combined, e.g. category:promotions older_than:1y.
- Combine operators with a space (AND) or a minus sign to exclude (e.g. -has:attachment).
- Clean Email uses these same operators under the hood to build fast, accurate scans of your Gmail inbox without reading your message content.
Gmail's search bar supports dozens of operators that go far beyond typing a keyword. This page covers the ones that matter most for finding and cleaning up old mail, plus how Clean Email uses them.
What Are Gmail Search Operators?
A Gmail search operator is a keyword followed by a colon, typed into the Gmail search bar, that filters your inbox by a specific property instead of just matching text.
For example, typing invoice searches for the word "invoice", but typing has:attachment searches for a property of the message — whether it carries a file — regardless of what the email says.
Operators can be combined in a single search, which is what makes them powerful for finding exactly the mail you want to read, archive, or delete.
Reference Table: Useful Gmail Search Operators
These are the operators most useful for inbox cleanup. All of them work when typed straight into Gmail's search bar.
| Operator | What it finds | Example |
|---|---|---|
| category:promotions | Marketing and promotional emails | category:promotions |
| category:social | Social network notifications | category:social |
| older_than: | Mail older than a given time (d = days, m = months, y = years) | older_than:1y |
| newer_than: | Mail newer than a given time | newer_than:7d |
| has:attachment | Messages with any attachment | has:attachment |
| is:unread | Messages you haven't opened yet | is:unread |
| is:starred | Starred messages | is:starred |
| from: | Messages from a specific sender or domain | from:newsletter@shop.com |
| larger: | Messages above a given size | larger:10M |
| label: | Messages carrying a specific Gmail label | label:Receipts |
Combining Operators for Powerful Searches
Put a space between operators to combine them (Gmail treats this as AND). Add a minus sign before an operator to exclude matches.
- category:promotions older_than:1y — promotional emails older than a year, a common first target for cleanup
- has:attachment larger:10M — large attachments taking up storage
- from:example.com is:unread — unread mail from one specific domain
- category:social -is:starred — social notifications you haven't starred
- older_than:2y -has:attachment — old mail with no attachment, usually safe to clear
How Clean Email Uses These Operators to Scan Your Inbox
Clean Email doesn't ask you to memorize any of this. After you sign in with Google, it builds a single Gmail search query per scan — everything in your inbox except protected mail — using operators such as -is:starred, -has:attachment and -in:sent to exclude protected mail up front, not to offer category- or age-based cleanup choices.
Protection is checked twice. First, operators narrow the search query up front so protected mail is excluded from the count early. Then, right before any deletion, Clean Email checks each message again individually — the authoritative guard — so protection holds even if a Gmail search operator behaves unexpectedly.
This is why a scan of thousands of emails takes only a few seconds: Gmail's own search index does the heavy lifting, the same index behind the search bar you use every day. Clean Email only reads message metadata (sender, labels, size, thread ID) to build these counts — it never reads or stores the content of your emails.
- has:attachment — keeps any message with a file, photo, or document safe from deletion
- is:starred — keeps starred messages safe
- is:important — keeps messages Gmail marked important safe
- label: — keeps messages carrying any user-created label safe
- in:sent, in:drafts, is:snoozed — keep your sent mail, drafts, and snoozed mail safe
FAQ
- What is the Gmail operator to find old emails?
- Use older_than: followed by a number and a unit — d for days, m for months, y for years. For example, older_than:1y finds every email older than one year, and older_than:6m finds mail older than six months.
- How do I search Gmail for emails with attachments?
- Type has:attachment in the Gmail search bar to show every message that carries a file, photo, PDF, or other attachment. Combine it with a size operator, like has:attachment larger:10M, to find large attachments specifically.
- How do I find promotional or newsletter emails in Gmail?
- Type category:promotions in the Gmail search bar. Gmail automatically sorts marketing emails and newsletters into this category, so the search returns them without you needing to know each sender.
- Can I combine multiple Gmail search operators in one search?
- Yes. Put a space between operators to combine them — for example, category:promotions older_than:1y finds promotional emails older than one year. Add a minus sign before an operator, like -has:attachment, to exclude matches instead.
- Does Clean Email read the content of my emails when it scans my inbox?
- No. Clean Email only reads message metadata — sender, labels, size, and thread ID — to build counts of what can be cleaned. It never reads, stores, or displays the content of your email bodies.
- What's the difference between is:unread and label: in Gmail search?
- is:unread finds messages you haven't opened yet, based on Gmail's read/unread status. label: finds messages carrying a specific Gmail label you've created or applied, regardless of whether they've been read.
Sources
Sign in with Google, scan your mailbox for free, then clean it in one click.
Clean your Gmail inbox nowUpdated: 2026-07-29