How Does the Pipe Symbol Work as OR in Google Search?

In Google Search, the pipe symbol acts as a direct, undocumented-style shorthand for the boolean OR operator. Instead of typing the word OR in all uppercase letters between two search terms, you can place a vertical bar between them to tell Google to return pages containing either term or both. This shortcut saves keystrokes, avoids accidental lowercase mistakes, and works across standard web searches as well as combined queries with other search operators.

How Google Interprets the Pipe Symbol

Google Search treats the pipe symbol | identically to the capitalized OR operator. When you enter coffee | tea, the search engine interprets it as coffee OR tea.

Unlike the word or in lowercase—which Google treats as a common stop word or a regular search term rather than a logical operator—the pipe symbol is always recognized as a logical disjunction. You do not need to worry about capitalization, making it faster and less error-prone when building complex queries.

Spacing and Syntax Rules

The pipe symbol is flexible with spacing, though consistent formatting helps keep longer queries readable:

  • With spaces: python | javascript
  • Without spaces: python|javascript

Both formats produce the same logical behavior. You can also chain multiple pipe symbols together to search for any of several options, such as laptop | tablet | desktop.

Combining the Pipe Symbol with Other Operators

The pipe symbol works seamlessly alongside other Google Search operators, allowing you to narrow down results while still keeping alternatives open.

  • With exact-match quotes: "machine learning" | "deep learning" finds pages containing either exact phrase.
  • With site search: site:edu "climate change" | "global warming" searches educational domains for either phrase.
  • With parentheses for grouping: (apple | orange) juice ensures Google applies the OR logic to the fruits before combining them with juice.

When to Use the Pipe Symbol

Using | is especially helpful when you are:

  1. Searching for synonyms or alternative spellings (e.g., color | colour).
  2. Comparing two products, tools, or concepts in a single query.
  3. Writing long, multi-condition search strings where typing OR repeatedly clutters the search bar.