CHM File Extension: What It Is & How to Open
In this article
The .chm file extension stands for Compiled HTML Help, a proprietary Microsoft format for online help documentation. It packages multiple HTML pages, images, JavaScript, and navigation elements into a single compressed file, making it a standard for software manuals and technical guides. CHM files are widely used on Windows, but they can be tricky to open on other operating systems and are often blocked by email providers due to security risks.
Origin and Background
Microsoft introduced CHM in 1997 as a successor to the older WinHelp (.hlp) format. The format is based on the HTML Help specification, which uses a compiled help engine (hh.exe) built into Windows. The goal was to create a help system that could be updated easily, support hyperlinks and full-text search, and compress content to reduce file size. CHM files are essentially a compressed archive of HTML files, a table of contents (TOC), an index, and a binary header. The format was widely adopted by software developers for user manuals, but its use has declined with the rise of web-based documentation.
How CHM Files Work Internally
A CHM file is a single binary file that contains multiple compressed components. The core elements include:
- HTML pages – the actual content, often styled with CSS and containing JavaScript.
- Table of contents (TOC) – a hierarchical list of topics, usually in .hhc format.
- Index file – an alphabetical keyword index (.hhk).
- Binary index – a full-text search index for quick searching.
- Graphics and other resources – images, icons, and style sheets.
The compression is performed using LZX compression, which is also used in cabinet files. The internal structure is not directly accessible as a folder; you need a tool like 7-Zip or a dedicated CHM extractor to view the individual files. When you open a CHM file, Windows uses the HTML Help executable (hh.exe) to render the content in a dedicated viewer window with a navigation pane on the left.
How to Open a CHM File on Windows
On Windows, opening a CHM file is straightforward:
- Double-click the file – it should open in the Microsoft HTML Help viewer.
- If it does not open, right-click the file and select Properties. If there is an Unblock button (because the file was downloaded from the internet), click it and then try opening again.
- If the file still won't open, try renaming the file extension to .zip and extracting it with an archive tool like 7-Zip to view the contents as HTML files.
If the CHM file shows a blank page or an error about navigation, it may be due to Windows security settings. You can right-click the file, choose Properties, and check the Unblock checkbox under the General tab. This is a common fix for files downloaded from the internet.
Opening CHM Files on macOS and Linux
CHM files are not natively supported on macOS or Linux. For macOS, you can use third-party applications like CHM Reader (a free plugin for Finder) or Calibre, which can convert CHM to EPUB. On Linux, popular options include xchm and KchmViewer, both of which are open-source and available in most package repositories. Alternatively, you can extract the CHM file using the 7z command-line tool (if installed) and then read the HTML files in any browser. For example, on Linux you might run 7z x file.chm to extract the contents into a folder.
Common Problems and Security Concerns
One of the most common issues with CHM files is that Windows blocks them when they are downloaded from the internet. This is because CHM files can contain executable scripts (JavaScript) that could be malicious. A CHM file is essentially an HTML container, and if it includes a script, it runs in the local zone, which could allow it to access local files. For this reason, many email providers and web browsers block CHM files outright. If you receive a CHM file from an untrusted source, do not open it – treat it like any executable file. Even if the file looks like a help manual, it could contain a virus.
Another problem is that CHM files may not display correctly on high-DPI displays or in newer versions of Windows, showing blurry text or missing images. This is often due to compatibility issues with the viewer. Additionally, some CHM files are created with non-standard encodings that cause garbled text.
Alternatives to CHM
While CHM is still used, many software vendors have moved to web-based help systems or PDF manuals. Alternatives include:
- HTML help – a simple set of HTML files hosted on a website or distributed as a ZIP.
- PDF – universal and easy to print, but not as interactive.
- Markdown with a static site generator – popular for developer documentation.
- Microsoft's newer Help Viewer (used in Visual Studio) – a separate system.
- EPUB – for e-reader compatible manuals.
If you are a developer creating help content, consider whether a web-based solution might be more accessible to users on different platforms.
Frequently Asked Questions
What does CHM stand for?
CHM stands for Compiled HTML Help. It is a Microsoft format that compiles HTML files into a single help document.
Can I convert a CHM file to PDF?
Yes, you can convert a CHM file to PDF using tools like Calibre (which can convert CHM to EPUB and then to PDF) or by opening the CHM file in a viewer and printing to PDF. Some dedicated converters also exist, but they may not preserve the navigation structure.
Why is my CHM file blank when I open it?
This usually happens because the file was downloaded from the internet and Windows blocked it. Right-click the file, select Properties, and check Unblock if it appears. Then reopen the file. Also, make sure the file is not corrupted.
Are CHM files safe to open?
CHM files can be dangerous because they can contain scripts that run with local permissions. Only open CHM files from trusted sources. If you are unsure, scan the file with antivirus software before opening.
How do I extract images from a CHM file?
You can extract the contents of a CHM file using 7-Zip: right-click the file, choose 7-Zip > Extract, and you will get a folder with all the HTML files and images. Alternatively, use a dedicated CHM extractor tool.