Fix TXT File Preview in OneDrive and Microsoft 365
Question details
The user needs to preview TXT files in OneDrive or Microsoft 365 without downloading them.

- Product
- Microsoft OneDrive and Microsoft 365
- Device & OS
- not provided
- Scenario
- Opening TXT files from OneDrive in a browser for preview.
- Observed behavior
- TXT files that previously opened in preview now require downloading in multiple browsers, while other users can still preview them.
Confirm that you are signed in to the correct OneDrive or Microsoft 365 account. Try another TXT file and a different file type to check whether the issue affects one file or the browser's preview behavior more broadly.
Clear the browser cache and test TXT previews
Use this first when previews fail on your computer but work for other users.
In Microsoft Edge, select Settings and more (the three-dot menu) > Settings > Privacy, search, and services. Under Clear browsing data, select Choose what to clear.
Select a time range, check Cached images and files, and select Clear now. If you also choose cookies, you may be signed out of websites.
Return to OneDrive or Microsoft 365 and select the affected TXT file. Also try another TXT file and a different file type to compare the results.
If you use Chrome, open its three-dot menu > Delete browsing data, select Cached images and files, and delete the data. Then reopen OneDrive and test the TXT file.

Address recurring TXT preview problems in Edge
Use these steps if clearing the cache works temporarily but the preview problem returns.
Open downloaded TXT files with WPS Office
WPS Office is a free, lightweight alternative with a familiar interface. Open downloaded TXT files locally and work with Microsoft Office documents as you move between applications. It does not repair OneDrive's browser preview.

Frequently Asked Questions
Why can other users preview the same TXT file?
If others can preview it, the file may be accessible and the issue may be local to your browser or computer. Clear the browser cache and test the file again.
What should I do if clearing the cache only works temporarily?
In Edge, open Settings > Privacy, search, and services > Choose what to clear every time you close the browser, and enable Cached images and files. You can also repair Edge through Windows Settings > Apps or reset it through Edge Settings > Reset settings.
Will clearing the cache sign me out of OneDrive?
Clearing cached images and files alone generally does not sign you out. Selecting cookies as well may sign you out of OneDrive and other websites.
How can I read the TXT file while preview is unavailable?
In OneDrive, select the file and choose Download, then open the downloaded TXT file in a local text editor or WPS Writer.




