To search for words inside files on Windows 11, open File Explorer, go to the folder that holds the files, type the word in the search box at the top right, and press Enter. Windows matches text inside files only when the folder is indexed, or when you turn on File contents in the search options. If you get file-name matches only, the fixes are to add the folder to the search index, set the file type to Index Properties and File Contents, or turn on content search for non-indexed folders.
This guide covers Windows 11 version 25H2 and earlier versions with the current File Explorer. Menu names were checked against Microsoft Support pages in October 2026. Some labels differ slightly between versions; those differences are noted in the steps.
Contents
- How Windows finds words inside files
- Search file contents in File Explorer
- Make sure the folder is indexed
- Turn on content indexing for a file type
- Search contents in folders that aren’t indexed
- Search operators that narrow results
- Search from the taskbar instead
- Search plain-text files with PowerShell
- Troubleshooting
- Frequently asked questions
How Windows finds words inside files
Windows Search uses an index. An index is a catalog Windows builds in the background of the files on your PC, including their names, properties (such as author and date), and, for files that contain text, the words inside them. Microsoft compares it to the index in a book: Windows looks up the word in the catalog instead of opening every file.
Three things decide whether a word inside a file shows up in results:
- Location. The folder must be in the index, or you must tell File Explorer to open and read non-indexed files during the search, which is slower.
- File type. Each file type has an indexing setting: properties only, or properties and file contents. Only the second makes the text searchable.
- Readable text. Windows needs a filter that can read the format. Plain text, Word, Excel, and PowerPoint files are common examples. A scanned PDF that is only a picture of a page has no text to find.
By default, Microsoft says the Classic index covers your Documents, Pictures, and Music folders plus the desktop. Files elsewhere, such as a folder on a second drive or a USB drive, aren’t in the index until you add them.
Search file contents in File Explorer
- Open File Explorer. Select the folder icon on the taskbar, or press Windows + E.
- Go to the folder that holds the files you want to search. Choose the smallest folder that you know contains the file. Searching This PC works too, but Microsoft describes it as slow.
- Select the search box at the top right of the window. It shows the name of the current folder, such as Search Documents.
- Type a word or phrase that appears in the file, then press Enter. File Explorer searches the folder and its subfolders.
- If the results show only files whose names match, open the search options. After you search, select Search options in the toolbar (on some versions it’s under See more, the three-dot button). Under Advanced options, select File contents.
- Wait for the green progress bar in the address bar to finish. Results that contain the word inside the file appear in the list.
- To see where the word appears, open the file and use the app’s own find command, usually Ctrl + F. File Explorer lists matching files but doesn’t highlight the text inside them.
For phrases, put quotation marks around the words, such as “quarterly budget”. Without quotes, Windows finds files that contain both words anywhere in the file.
If you often work in several folders at once, our guide on opening multiple File Explorer windows in Windows 11 shows how to search one folder while browsing another.
Make sure the folder is indexed
If your files live outside Documents, Pictures, Music, or the desktop, add their folder to the index. Searches there become faster and can match file contents.
- Open Settings (press Windows + I).
- Select Privacy & security, then Search. On some versions this page is called Searching Windows.
- Under Find my files, choose Classic or Enhanced. Classic indexes your libraries and desktop. Enhanced indexes your entire PC; Microsoft notes it gives more complete results but may use more system resources, and you can still exclude folders under Exclude folders from enhanced search.
- If you chose Classic, select Customize search locations. The Indexing Options window opens. Select Modify, check the folder you want, and select OK.
- Close the windows. Windows starts indexing the new location in the background.
Microsoft says the first full index can take up to a couple of hours. After that, Windows updates it as files change. Searches made while indexing is still running may be incomplete.
You can also open the same Indexing Options window by typing indexing options in the taskbar search box and selecting it from the results.
Turn on content indexing for a file type
A folder can be indexed while a file type inside it is set to “properties only.” In that case, Windows finds those files by name but not by the words inside them. Microsoft documents how to change this per file type.
- Open Settings > Privacy & security > Search (or Searching Windows).
- Select Customize search locations under Find my files with Classic selected, or select Advanced indexing options if your page shows that link. The Indexing Options window opens.
- Select Advanced, then the File Types tab.
- Find the extension in the list, such as docx, txt, pdf, or md. Select it.
- Under How should this file be indexed?, select Index Properties and File Contents.
- Select OK, then Close. Windows re-indexes files of that type.
If the extension isn’t in the list, type it in the box at the bottom (Add new extension to list) and select Add, then set it to Index Properties and File Contents. Windows reads unknown types as plain text, which works for text-based files such as code or log files but not for binary formats.
Microsoft notes that indexing contents makes the index larger. Its rule of thumb is that the index is under 10 percent of the size of the indexed files, though many very small files or source code can push it higher.
Search contents in folders that aren’t indexed
For a one-time search in a folder you don’t want to index, such as a backup drive, you can tell File Explorer to read file contents directly. This is slower, because Windows opens each file during the search.
Option 1: per search. Use Search options > Advanced options > File contents, as in the File Explorer steps above. The setting applies to the current search.
Option 2: always.
- In File Explorer, select See more (the three-dot button) on the toolbar, then Options. The Folder Options window opens. (In Control Panel, the same window is called File Explorer Options.)
- Select the Search tab.
- Under When searching non-indexed locations, check Always search file names and contents (this might take several minutes).
- Select OK.
Leave this setting off if you mostly search indexed folders. In non-indexed locations, it makes every search slower. If you search the same folder often, adding it to the index is the faster fix.
Search operators that narrow results
You can type these in the File Explorer search box along with your words. Microsoft documents them as part of Windows search query syntax.
| Type this | What it finds |
|---|---|
"social security" |
Files that contain the exact phrase |
invoice OR receipt |
Files that contain either word (OR must be uppercase) |
budget NOT draft |
Files that contain “budget” but not “draft” (NOT must be uppercase) |
budget ext:.xlsx |
Only Excel files that match “budget” |
kind:docs budget |
Only documents that match “budget” |
modified:last week report |
Files changed last week that match “report” |
Microsoft notes that OR and NOT can’t be combined in the same search. You can also use the filter buttons that appear in the toolbar after you search, such as Date modified, Kind, and Size, instead of typing these terms.
Many users also type content: before a word, for example content:invoice, to match only text inside files. Microsoft’s current support pages don’t describe this filter, so if it doesn’t work on your PC, use Search options > File contents instead.
Search from the taskbar instead
The search box on the taskbar searches the index too.
- Select Search on the taskbar, or press Windows + S.
- Type a word from the document.
- Select the Documents tab at the top of the results to show only files.
Microsoft says you can type the name of a document or a keyword from it. In practice, taskbar search covers only indexed locations and may not show every content match, so File Explorer is more reliable for this task. If web results get in the way, see our guide to turning off Bing search in Windows 11.
Copilot+ PCs. Microsoft says Copilot+ PCs add semantic indexing for common document and image formats, so a search can return files related to your words, not only exact matches. Semantic indexing is on by default on those PCs. On other PCs, search works with the standard index described above.
Search plain-text files with PowerShell
For text-based files such as .txt, .csv, .log, or code, PowerShell’s Select-String command searches contents without the index and shows the matching line. It doesn’t read Word, Excel, or PDF files, because those store text in a compressed format.
- Right-click Start and select Terminal.
- Type a command like this one, changing the folder path and the word, then press Enter:
Get-ChildItem "C:\Users\YourName\Documents" -Recurse -Include *.txt,*.csv | Select-String -Pattern "invoice" - PowerShell lists each match as the file path, the line number, and the line of text.
Microsoft documents the command on its Select-String reference page. This method only reads files, so it doesn’t change anything on your PC.
Troubleshooting
Only file names match, never contents. Check three things in order: the folder is in the index (or File contents is turned on), the file type is set to Index Properties and File Contents, and indexing has finished. Settings shows the indexing status on the Search page.
Search used to find contents and stopped. Rebuild the index. Open Indexing Options, select Advanced, then under Troubleshooting select Rebuild. Rebuilding can take a long time, and searches are incomplete until it finishes.
PDFs aren’t found. Make sure pdf is set to Index Properties and File Contents. If the PDF is a scanned image, there is no text layer to search. Open it and check whether you can select the text; if not, Windows can’t search it.
Files on a USB drive or network folder aren’t found. These locations usually aren’t indexed. Use Search options > File contents for that search, and expect it to be slow.
Encrypted files aren’t found. In Indexing Options > Advanced, there’s an Index encrypted files option on the Index Settings tab. Turn it on only if you’re comfortable with the content of those files being in the index.
Search is very slow. Search a smaller folder instead of This PC, add folders you search often to the index, and remove folders you never search. If the index is damaged, rebuild it.
OneDrive files are missing. Files set to online-only may not have their contents on your PC. Right-click the file or folder and select Always keep on this device, then let indexing catch up.
Frequently asked questions
Does File Explorer search inside Word and Excel files?
Yes, when the folder is indexed and the file types are set to index file contents, or when you turn on File contents for the search. You’ll see which files match, but you’ll need to open each file to find the exact spot.
Can I search for an exact phrase?
Yes. Put the phrase in quotation marks, such as “project deadline”. Without quotes, Windows matches files that contain all the words anywhere in the file.
Why are the results different from taskbar search?
Taskbar search shows a short list from the index, mixed with apps and settings. File Explorer searches the folder you’re in, can read non-indexed files, and gives you filters for date, type, and size.
Is it safe to index my whole PC?
Microsoft says the index is stored on your PC and isn’t used to train AI models. It also warns that apps you install may be able to read the index, so install only apps you trust. Indexing the whole PC (Enhanced) uses more resources, so many people index only the folders they search.
Does indexing slow down my PC?
Indexing runs in the background and is busiest right after you add locations or after a rebuild. Microsoft suggests plugging in a laptop during the first full index on Copilot+ PCs.
Can I search inside ZIP files?
File Explorer has an option for compressed files. On the Search tab in Folder Options, check Include compressed files (ZIP, CAB…) under When searching non-indexed locations. It can make searches slower.
Next step
Start with the folder you search most: add it to the index, check that its main file types are set to index contents, and run a test search for a word you know is inside a file. Microsoft’s Search indexing in Windows page has more detail on index size, file types, and Copilot+ search.
Matthew Simpson has been creating online tutorial for computers and smartphones since 2010. His work has been read millions of times and helped people to solve a number of various tech problems. His specialties include Windows, iPhones, and Google apps.