Preview any text file

The preview pane in the File Explorer will preview .txt files, but it will not by default allow you to preview .json, .pas, .dpr files and many other files, even if they really are text files.
Luckily, there is a simple remedy for this.

Locate the extension you want to view as text – f.x. .json

You will find it under

Add a REG_SZ string named “PerceivedType” and give it the value “text”

This will instantly allow you to preview .json files in File Explorer. No restart needed, just click on the file name again.

Another example, is the Delphi .dpr files that do not preview.

Add the PerceivedType key for .dpr

and voila

Not rocket science, but kinda handy.

Leave a Reply