OneDrive File Issues

Fix TXT File Preview in OneDrive and Microsoft 365

Bushra ParveenBushra Parveen Nov 14, 2026 868 views

Question details

The user needs to preview TXT files in OneDrive or Microsoft 365 without downloading them.

Fix TXT File Preview in OneDrive and Microsoft 365
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.
Before you start

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.

Solution 1Recommended

Clear the browser cache and test TXT previews

Use this first when previews fail on your computer but work for other users.

1
Open browsing data settings

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.

2
Clear cached files

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.

3
Test the preview

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.

4
Repeat in another browser

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.

Clear the browser cache and test TXT previews
If the issue returns: Clearing the cache may restore previews only temporarily. If you need to repeat it during the day, try the recurring-issue steps below.
Free Microsoft Office alternative

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.

Open downloaded TXT files locally in WPS WriterCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for an easier transition from Microsoft OfficeFree and lightweight office suite
microsoft office alternative - wps office

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.