What is a CHM file?
The CHM file format represents Microsoft HTML help file that consists of a collection of HTML pages. It provides an index for quick accessing the topics and navigation to different parts of the help document. The CHM file can be searched for contents via the provided search option. CHM is Microsoft Proprietary online help file format that is often used for software documentation. In addition, it is used in several other applications like training guides, interactive books, and electronic newsletters. Most of the modern Microsoft Development environments support generating CHM documentation from information available in the application.
The unique ability of CHM file format to implement a combined table of contents and index makes it distinct over other standard HTML pages. The generated CHM file is relatively small in size and, hence, can easily be distributed with software packages. The help authoring tool, HTML Help Workshop, provides an easy-to-use system for creating and managing help projects and their related files. CHM files may include text, images, and hyperlinks; viewable in a Web browser; used by Windows and other programs as an online help solution.
CHM File Format
The final form of generated CHM file depends on how the help system is designed and whether it is destined for an application or a web site. A CHM file supports data compression with LZX compression to generate the compressed HTML files. It has the built-in search engine for quick searching of contents along with the capability to merge multiple .CHM files. A CHM file consists of a set of HTML files, a linked Table of contents and an index file.
HTML Files
Whether you are creating help topics for distribution with a program, or on the Web, the documents you author are created using a special formatting language known as Hypertext Markup Language (HTML). HTML topic files have a .htm or .html file name extension.
Although each help topic or Web page you author appears to be a document with text, graphics, or animated images on it, .htm files are actually text documents that have special HTML formatting codes. These codes, called tags, tell a browser how to display each page. Only the text that appears in a topic or Web page is actually in the .htm file. Any graphics, sounds, animated images, or other elements that appear are separate files that your HTML file points to. The browser copies or downloads the graphics, sounds, or other elements when it sees the tags telling it to do so.
Table of Contents (TOC)
The help table of contents (.hhc) file is an HTML file that contains the topic titles for your table of contents. When a user opens the table of contents in a compiled help file (or on a Web page) and clicks a topic title, the HTML file associated with that title will open.
Index File
The index (.hhk) file is an HTML file that contains the index entries (keywords) for your index. When a user opens the index in a compiled help file, or on a Web page, and clicks a keyword, the HTML file associated with the keyword will open.
HTML Help Components
HTML Help is made up of several components. These include the following:
HTML Help Workshop: a help authoring tool with an easy-to-use graphical interface for creating project files, HTML topic files, contents files, index files, and everything else you need to put together an online help system or Web site.HTML Help ActiveX control: a small, modular program used to insert help navigation and secondary window functionality into an HTML file.The HTML Help Viewer: a fully-functional and customizable three-paned window in which online help topics can appear.Microsoft HTML Help Image Editor: an online graphics tool for creating screen shots; and for converting, editing, and viewing image files.The HTML Help Java Applet: a small, Java-based program that can be used instead of an ActiveX control to insert help navigation into an HTML file.The HTML Help executable program: the program that displays and runs help when you click a compiled help file.The HTML Help compiler: the program that compiles project, contents, index, topic, and other files into a compiled help file.The HTML Help Authoring Guide: an online guide designed to assist help authors in using HTML Help to design a help system. The guide also contains a complete HTML Help reference for developers and an HTML tag reference for authors.
Key Characteristics of CHM Files
| Characteristic | Description |
|---|---|
| File Extension | .chm |
| Proprietary Microsoft Format | CHM is a closed format owned by Microsoft, though its specification has been partially reverse-engineered by third parties. |
| Single-File Distribution | The compilation of multiple resources into one .chm file simplified software distribution and installation. |
| Windows-Centric Ecosystem | While third-party viewers exist for other platforms, CHM was designed primarily for and works best on Windows systems. |
| HTML-Based Content | Leverages web technologies (HTML, CSS, JavaScript) while functioning completely offline—a precursor to modern Progressive Web Apps. |
| Backwards Compatibility Focus | CHM replaced the older WinHelp (.hlp) format but maintained some compatibility layers for migration. |
| Declining Native Support | Modern Windows versions have gradually reduced built-in CHM support due to security concerns and format obsolescence. |
FAQ
Q1: How can I open a CHM file on modern Windows?
A: Recent Windows versions may require right-clicking the file, selecting Properties, and checking “Unblock” before opening with the built-in HTML Help Viewer.
Q2: Can CHM files be opened on macOS or Linux?
A: Yes, using third-party viewers like KchmViewer (Linux) or Chmox (macOS), though with potential formatting differences.
Q3: Is it possible to extract content from a CHM file?
A: Yes, using tools like 7-Zip or dedicated CHM decompilers, though some files may have extraction restrictions.
Q4: Are CHM files secure to open from the internet?
A: Modern Windows treats downloaded CHM files as potentially dangerous due to historical vulnerabilities, requiring explicit user permission to open.
Q5: What has replaced CHM for modern software documentation?
A: Most modern applications use web-based help systems, Microsoft Help 2.0 (for Visual Studio), or documentation platforms like Read the Docs.