[Finder] Quick Look shows HTML files as plain text

Quicklook in the finder shows HTML files als plain text.


Is there any way to get a "rendered" view in the quick look?


It would be great, if such a rendered view would be possible even for PHP files, too.


Thanks for your help.

MacBook Pro with Retina display, macOS High Sierra (10.13)

Posted on Oct 13, 2017 2:38 AM

28 replies

Oct 13, 2017 11:50 AM in response to Community User

Hello thulium,

Quicklook is rendering HTML files fine for me. Maybe you have some system modification or internet plug-in that is interfering. Try creating a new local account on your machine and try it there. If it works, then the problem is likely some software or plug-in running locally to your account. If it still doesn't work, then the problem is deeper than that.


PHP really needs a web server. In theory, you could probably make it work. But I don't see Apple or anyone else going to that level of effort for a web development task.

Oct 13, 2017 1:52 PM in response to Community User

The majority, but not all, of the .html files that I have from older editing sessions that are UTI text/html charset=us-ascii will neither show the resolved HTML page on the icon, nor in Quick Look. The system thinks these are just code.


Those that are UTI text/html charset=utf-8 all display the resolved HTML on the icon, and in Quick Look. All have Safari in common as the default Open With browser. The only browser plug-ins in use are current Adobe Flash, and the Apple default PDF plug-in. No Extensions are used.

Oct 13, 2017 4:28 PM in response to Community User

Hello again thulium,

I don't know anything about a "quick look" app. I was only referring to macOS "QuickLook" feature that displays a preview when you press the space bar. If you have a "quick look" an app installed, I suggest you remove it and see if that fixes the problem. I can get a screenshot, but it is on my High Sierra machine which is in the other room. You'll just have to trust me (and dialabrain) that it works.


PHP files will only show like html files if properly loaded from a server. In most cases, they will require a long list of add-on libraries, databases, and various other resources that are unlikely to exist on your Mac.

Oct 14, 2017 5:52 PM in response to Community User

I'm totally confused now. Throughout this thread, you have only posted one screenshot of an Apple product and in that screenshot, the preview was correct. Are you saying that you posted the Apple screenshot in error and it is Forklift that isn't working?


You will have to ask the developers of Forklift for help with that. Here is their support page: http://www.binarynights.com/forklift/support

Oct 14, 2017 6:56 AM in response to Community User

According to your screenshots, QuickLook appears to be working. You keep asking for screenshots. OK. Here you go:

User uploaded file

The selected file is the index file from one of my websites. You can see the Finder preview thumbnail in the right hand pane. I have pressed the space bar to display the full QuickLook preview image in a separate window.


On the right, in the Finder Preview pane, is a QuickLook preview of the document. When it does the thumbnail preview, it doesn't appear to include CSS style sheets. I guess it does that for performance reasons, which makes sense. The full preview includes the style sheets.


Could you include a screenshot of your own that shows the feature not working? So far, the only screenshot you have provided is on that shows it is working.


And can you PLEASE clarify what you mean by this 'app "Quick look"'? Do you have an app called "Quick Look" in your applications folder? If so, that is what is causing your problem. Drag it to the Trash and empty.

Oct 15, 2017 6:43 AM in response to Community User

I am assuming that external CSS style sheets are not used for thumbnails for performance reasons. The Finder can display hundreds or thousands of such thumbnail previews at once. The Finder preview pane is somewhere in-between. It only displays a single file but it does not require a special command, like the space bar, to display it. Given that the preview isn't displayed by default, and HTML files on disk are relatively rare on most users' machines, it seems like the correct choice from my perspective.

Oct 15, 2017 7:10 AM in response to etresoft

I am assuming that external CSS style sheets are not used for thumbnails for performance reasons. The Finder can display hundreds or thousands of such thumbnail previews at once. The Finder preview pane is somewhere in-between. It only displays a single file but it does not require a special command, like the space bar, to display it. Given that the preview isn't displayed by default, and HTML files on disk are relatively rare on most users' machines, it seems like the correct choice from my perspective.

I agree. When I don't feel like launching a browser, I use preview.app. And to look though every file in a certain folder with certain category, once you push a space bar on a first file and resize it, you don't need extra action from the second file. You just push down arrow to preview next file. Another advantage using preview for previewing is that you can scroll contents in a long file. I recommend safari to save html files for that purpose, because web archives are single-all-in-one web file so that you don't come across folders or other messy files, you just push down arrows to see a next file.

Oct 14, 2017 12:30 AM in response to FlanklyIm

Thanks for your help.


I created a minimal test case and did some testing now.


Indeed the finder shows a kind of "thumbnail" of a standard html file.

But that is not the same as readable quick look preview.

Please see my screenshots below.


I'm looking for a way to display a readable preview of a html file in the finder.


Source code of the HTML:

User uploaded file


Screenshot of that file:

User uploaded file

Screenshot of a txt file to compare:


User uploaded file

Oct 14, 2017 2:24 PM in response to etresoft

etresoft wrote:


Could you include a screenshot of your own that shows the feature not working? So far, the only screenshot you have provided is on that shows it is working.


Thanks for your question. It was my mistake, that I checked the "Finder preview pane" only in my Finder clone "Forklift" and not in the Finder itself. I was thinking, that Forklift just uses the Finder functions for the preview pane.
I was wrong. Sorry for that please.

Screenshot of Forklift:


User uploaded file


etresoft wrote:



And can you PLEASE clarify what you mean by this 'app "Quick look"'? Do you have an app called "Quick Look" in your applications folder? If so, that is what is causing your problem. Drag it to the Trash and empty.

The localized german name of the App "Quick Look" is "Vorschau". And yes, that name appears in the application folder.
"Vorschau.app". I wonder, why you do not see Quick Look in your application folder. It is an app.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

[Finder] Quick Look shows HTML files as plain text

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.