# How do I use Google search operators in Gmail? — Adinand Email Cleaner

Last reviewed: September 23, 2026. HTML version: https://adinandemail.com/answers/use-google-search-operators

**Gmail's search box is a query language, and about fifteen of its operators do almost all the useful work.** Every operator below is on Gmail's own reference page ([*Refine searches in Gmail*](https://support.google.com/mail/answer/7190), read 23 September 2026); the combined examples are ours. Note first that these are Gmail's operators — `site:` and `filetype:` belong to Google Search, a different set for a different box ([*Refine Google searches*](https://support.google.com/websearch/answer/2466433), read 23 September 2026).

## Who and what <ul> <li>`from:` · `to:` · `cc:` · `bcc:` — addresses. Google's examples use a full address, `from:amy@example.com`, or `from:me`.</li> <li>`subject:` — subject line only, which is usually what you actually remember.</li> <li>`filename:` — matches the attached file's name, including a bare extension: `filename:pdf`.</li> <li>`list:` — "Find emails from a mailing list", by the list's own address: `list:info@example.com`.</li> </ul>

## When <ul> <li>`older_than:` · `newer_than:` — relative, using `d`, `m` or `y`: `older_than:1y`.</li> <li>`before:` · `after:` — absolute dates, written `after:2024/04/16`.</li> </ul>

## How big <ul> <li>`larger:` · `smaller:` · `size:` — `larger:10M` takes a unit; Google's `size:` example is a plain number, `size:1000000`.</li> <li>`has:attachment`, plus `has:drive`, `has:document`, `has:spreadsheet`, `has:presentation`, `has:youtube`.</li> </ul> <p>⚠️ **The number rule.** Google states it plainly: "When using numbers as part of your query, a space or a dash (-) will separate a number while a dot (.) will be a decimal." Its own example: "01.2047-100 is considered 2 numbers: 01.2047 and 100." Google does not spell out what a split number does to the rest of a query, which is reason enough to type numbers in one piece.</p>

## Where, and state <ul> <li>`in:anywhere` — **includes Spam and Trash**, which by default "aren’t included in a standard search" ([*Search in Gmail*](https://support.google.com/mail/answer/6593), read 23 September 2026). It is the first thing to try when a message you know exists will not show up.</li> <li>`in:archive` · `in:snoozed`.</li> <li>`is:unread` · `is:read` · `is:starred` · `is:important` · `is:muted`.</li> <li>`category:` — if you use inbox categories: `promotions`, `social`, `updates`, `forums`, and a few more.</li> <li>`has:userlabels` · `has:nouserlabels` — mail with or without a label of yours. Google adds that labels "are only added to a message, and not an entire conversation".</li> </ul>

## Joining them up <p>`OR` (or curly braces) and `AND`, a leading `-` to exclude, and `AROUND` for proximity — `holiday AROUND 5 invoice`. Parentheses group. Three that earn their keep:</p> <ul> <li>`in:anywhere older_than:2y has:attachment larger:5M` — old heavy mail, Spam and Trash included.</li> <li>`category:promotions older_than:6m` — the obvious clear-out, scoped by date so you do not catch this week's.</li> <li>`from:amy@example.com -is:starred` — one sender, minus what you starred. Google warns that with a negative operator "conversations with excluded criteria may still appear", so a starred message can surface inside a conversation that also holds an unstarred one.</li> </ul>

## What operators cannot do <p>They query messages. Nothing on Google's list groups or totals results by sender. A `larger:` search finds every heavy message at once, and you still will not see the newsletter that arrived every Tuesday for six years — each message too small to clear the threshold, the total larger than anything on the list. Turning a search into a standing rule is what filters are for. [How Gmail filters work.](https://adinandemail.com/answers/gmail-filters)</p>

Related: [Find large emails in Gmail](https://adinandemail.com/answers/find-large-emails-in-gmail) · [What takes up space in Gmail?](https://adinandemail.com/answers/what-takes-up-space-in-gmail) · [Gmail filters](https://adinandemail.com/answers/gmail-filters) · [How to clean up Gmail](https://adinandemail.com/answers/how-to-clean-up-gmail)
