Is There a Difference Between ext: and filetype: in Google?

For most everyday Google searches, there is no functional difference between the ext: and filetype: operators. Both instruct Google to restrict search results to documents matching a specific file extension, such as PDF, DOCX, or XLSX. However, there are subtle historical and technical distinctions in how Google treats them under the hood, particularly regarding MIME types versus file extensions and how they behave with certain non-standard URLs.

How Both Operators Work in Practice

In standard usage, ext:pdf and filetype:pdf return the same set of results. Google officially documents filetype: as its primary operator for filtering by file format, while ext: acts as an undocumented alias that behaves identically in almost every scenario.

You can use either operator to find specific document types across the web or within a particular domain:

  • site:example.gov filetype:pdf
  • site:example.gov ext:pdf

Both queries tell Google's index to return only PDF files hosted on example.gov.

Technical Distinctions Between ext: and filetype:

While they overlap almost completely, a few technical nuances separate the two operators:

  1. Extension vs. MIME Type Matching: Historically, ext: strictly matched the file extension at the end of a URL, whereas filetype: could also match based on the MIME type or content header returned by the server. Today, Google's indexing pipeline relies heavily on content-type detection for both, which is why their results are nearly identical.
  2. Dynamic URLs: If a server serves a PDF through a dynamic script URL that does not end in .pdf (for example, download.php?id=123), filetype:pdf is more reliably associated with Google's official content-type classification, though modern Google indexing generally handles both well.
  3. Official Support: Google's search documentation explicitly lists filetype: as a supported search operator. Because ext: is an alias, filetype: is the safer choice for long-term reliability in automated queries or saved search workflows.

Which Operator Should You Use?

If you are typing a quick manual search, ext: is slightly shorter and easier to type. If you are building repeatable search queries, documentation, or OSINT workflows, filetype: is the better option because it is officially supported and universally recognized across search engines like Bing and DuckDuckGo.