Recent from talks
Contribute something
Nothing was collected or created yet.
Microsoft Compiled HTML Help
View on Wikipedia| Microsoft Compiled HTML Help | |
|---|---|
| Filename extension |
.chm |
| Internet media type |
application/vnd.ms-htmlhelp[1] |
| Developed by | Microsoft |
| Initial release | 1997 |
| Latest release | 1.4[2] |
| Extended to | .lit |
| Microsoft HTML Help Executable | |
|---|---|
| Other names | hh.exe |
| Developer | Microsoft |
| Included with | Microsoft Windows |
| Predecessor | Microsoft WinHelp |
| Successor | Microsoft Help 2 |
| Type | Help system |
Microsoft Compiled HTML Help (CHM) is a Microsoft proprietary online help format, consisting of a collection of HTML pages, an index and other navigation tools. The files are compressed and deployed in a binary format with the extension .CHM. The format was intended to succeed Microsoft WinHelp.
Although the format was designed by Microsoft, it has been successfully reverse-engineered and is now supported by many document viewers.
History
[edit]CHM was introduced as the successor to Microsoft WinHelp with the release of Windows 95 OSR 2.5. Within the Windows NT family, the CHM file support is introduced in Windows NT 4.0[3][4] and is still supported in Windows 11.[5]
| Month | Year | Description |
|---|---|---|
| February | 1996 | Microsoft announces plans to stop development of WinHelp and start development on HTML Help. |
| August | 1997 | HTML Help 1.0 (HH 1.0) is released with Internet Explorer 4. |
| February | 1998 | HTML Help 1.1a ships with Windows 98. |
| January | 2000 | HTML Help 1.3 ships with Windows 2000. |
| July | HTML Help 1.32 releases with Internet Explorer 5.5 and Windows Me. | |
| October | 2001 | HTML Help 1.33 releases with Internet Explorer 6 and Windows XP. |
| March | At the WritersUA (formerly WinWriters) conference, Microsoft announces plans for a new help platform, Help 2, which is also HTML based. | |
| January | 2003 | Microsoft decides not to release Microsoft Help 2 as a general Help platform. |
Microsoft has announced that they do not intend to add any new features to HTML Help.[6]
File format
[edit]Help is delivered as a binary file with the .chm extension. It contains a set of HTML files, a hyperlinked table of contents, and an index file. The file format has been reverse-engineered and documentation of it is freely available.[7][8]
The file starts with bytes "ITSF" (in ASCII), for "Info-Tech Storage Format", which is the internal name given by Microsoft to the generic storage file format used for CHM files.[9]
CHM files support the following features:
- Data compression (using LZX)
- Built-in search engine
- Ability to merge multiple .chm help files
- Extended character support, although it does not fully support Unicode.[10]
The Microsoft Reader's .lit file format is a modification of the HTML Help CHM format. CHM files are sometimes used for e-books.[11]
Viewers
[edit]In addition to Microsoft Windows, the following apps support CHM:
| Name | Operating system | Website | |
|---|---|---|---|
| Okular | Windows, Linux, Unix-like | okular |
Uses hh.exe on Windows
|
| Calibre | Windows, macOs, Linux, | calibre-ebook |
|
| Sumatra PDF | Windows | www sumatrapdf on GitHub |
|
| GnoCHM | Linux, BSD | GnoCHM on SourceForge | |
| CHM View | None/Uncompiled | chmviewkit on GitHub | |
| kchmviewer | Windows, Linux | ulduzsoft |
|
| KCHM | Linux, BSD, Solaris | KCHM on SourceForge | |
| CHMPane | Windows, macOS, Linux | CHMPane on SourceForge | |
| CHMate Neue | iOS, iPadOS, visionOS | CHMate Neue on iTunes | |
| iChm | iOS, macOS | iChm on iTunes | Discontinued |
| ChmPlus | iOS, iPadOS, macOS, visionOS | ChmPlus on iTunes | |
| Chmox | macOS | chmox Chmox on SourceForge |
|
| Clearview | macOS | Clearview on iTunes | |
| DisplayCHM | Linux | linux-apps |
|
| KOReader | Android, Linux | koreader |
|
| 7-zip | Windows (GUI), MacOS (command-line), Linux (command-line) | www |
7-zip can show the contents of .chm files as though they are a compressed archive, but does not render the HTML as a help-viewer. |
Creators
[edit]Microsoft's HTML Help Workshop generates CHM files by instructions stored in an HTML Help project file, which bears a .HHP file name extension and is a specialized form of INI file.[12]
Lazarus and Free Pascal provide a doxygen-like tool for CHM generation and a separate command-line compiler called chmcmd.
Other utilities
[edit]The official viewer in Microsoft Windows (hh.exe) can decompile a CHM file. So can Microsoft HTML Help Workshop and 7-Zip. Calibre and arCHMage can convert CHM into another format.
See also
[edit]References
[edit]- ^ Techtonik, Anatoly (11 April 2006). "application/vnd.ms-htmlhelp". Retrieved 7 March 2012.
- ^ "Microsoft HTML Help 1.4". Windows Dev Center. Microsoft. Retrieved 10 January 2017.
- ^ "Microsoft Security Bulletin MS02-055 - Critical". docs.microsoft.com. Retrieved 2020-10-29.
- ^ "Full Disclosure: HtmlHelp - .CHM File Heap Overflow". seclists.org. Retrieved 2020-10-29.
- ^ "[SOLVED] Windows 10 CHM Help Files showing up blank. - Spiceworks". community.spiceworks.com. Retrieved 2020-10-29.
- ^ "Microsoft HTML Help Downloads". Microsoft. Retrieved 6 March 2012.
- ^ Wise, Paul; Wing, Jed (2005). "Unofficial (Preliminary) HTML Help Specification". Retrieved 15 August 2012.
- ^ Palade, Alexandru (2005). "Archive::Chm". Retrieved 22 July 2014.
- ^ "Virus Bulletin :: Chamber of horrors". www.virusbulletin.com. Retrieved 2022-01-05.
- ^ "INFO: Limited Unicode Support in HTML Help". Microsoft. 11 April 2001. Archived from the original on 13 March 2016. Retrieved 17 March 2012.
- ^ Salomon, David; Motta, Giovanni; Bryant, David (CON) (2009). Handbook of Data Compression (5th, illustrated ed.). Springer. ISBN 978-1-84882-902-2.
- ^ Wise, Paul; Wing, Jed (2005). "Unofficial (Preliminary) HTML Help Specification INI formats". Retrieved 1 February 2018.
External links
[edit]- HTML Help Web Page on MSDN Archived 2008-04-12 at the Wayback Machine
- Microsoft Help 2 Reference Archived 2008-04-18 at the Wayback Machine (part of Visual Studio SDK for VS7.1 and VS8.0)
- History of HTML Help
- Unofficial (Preliminary) HTML Help Specification (the linked ITSF specification has been moved to the Russotto.net domain)
Microsoft Compiled HTML Help
View on GrokipediaHistory and Development
Origins as Successor to WinHelp
In the mid-1990s, Microsoft was expanding its ecosystem around Windows and emerging web technologies, prompting innovations in software documentation tools. Ralph Walden, who joined Microsoft in 1987, played a pivotal role in this evolution; he initially developed QuickHelp, a character-based help system for MS-DOS and OS/2, released that year. By 1992, Walden had taken over the development of WinHelp, enhancing it to version 4.0 by 1995 for Windows 95 and NT 3.51, which introduced 32-bit support but remained constrained by the era's hardware limitations.[4] In February 1996, Microsoft announced plans to develop HTML Help as the successor to WinHelp. WinHelp files, stored in the proprietary .hlp binary format, offered basic hypertext capabilities but faced significant constraints, including memory limitations that hindered scalability for larger help systems and inherent security vulnerabilities due to its closed structure. While it supported simple graphics like bitmaps and limited hyperlinks, the format lacked robust multimedia integration beyond text and static images, making it ill-suited for the increasingly dynamic content demands of the web era. These shortcomings, compounded by the proprietary nature that restricted cross-platform compatibility, motivated Microsoft to seek a more flexible alternative.[4][5][6] Microsoft introduced Compiled HTML Help (CHM) in 1997 as an HTML-based successor to WinHelp, leveraging web standards to enable richer, more interactive documentation. This format debuted with Internet Explorer 4.0 and was integrated into Windows 95 OSR 2.5, allowing seamless embedding of help content within the operating system's evolving web-oriented features. The shift aligned with broader industry trends toward HTML, addressing WinHelp's rigidity by enabling developers to create web-like experiences without abandoning offline distribution.[1][7][8] The initial design of CHM emphasized practical advantages for distribution and usability, compiling multiple HTML pages, images, and resources into a single .chm file for easy sharing. Built-in compression reduced file sizes significantly compared to loose HTML collections, facilitating efficient delivery via CD-ROM or downloads. Navigation was enhanced through integrated tools like a combined table of contents and index, plus full-text search, providing users with intuitive access to content that surpassed WinHelp's capabilities.[1]Release and Version History
Microsoft Compiled HTML Help (CHM) was first introduced in August 1997 as version 1.0, coinciding with the release of Internet Explorer 4.0 and integration into Windows 95 OSR 2.5, providing basic support for compiling HTML content into a single, navigable help file format.[9] This initial version focused on core functionality such as embedding HTML pages, tables of contents, indexes, and simple navigation tools, marking a shift from the older WinHelp system to web-compatible help delivery.[10] Full integration arrived with Windows 98 in June 1998, where version 1.1 enhanced compatibility and performance on consumer operating systems, followed by support in Windows NT 4.0 Service Pack 4 later that year for enterprise environments.[11] By early 2000, version 1.3 was released alongside Windows 2000, introducing Unicode support and satellite DLLs for multilingual help.[4][10] The technology progressed to version 1.4 around 2002, coinciding with Windows XP Service Pack 1, adding security policies to restrict potentially unsafe commands like shortcuts and WinHelp invocations, along with bug fixes.[9][10] This remains the latest stable version as of 2025, with no subsequent major updates, though minor stability fixes have been incorporated through Windows updates.[1] Parallel to the runtime evolution, the HTML Help Workshop authoring tool debuted in version 1.0 in 1997 to facilitate CHM creation, evolving to version 1.3 by 2000 with additions like project file management and decompiler support.[2] No further versions of the Workshop have been released since, but it continues to be available for download from the Microsoft Download Center, supporting compilation up to the 1.4 runtime standard.[2] CHM reached peak adoption in the early 2000s, notably powering documentation in applications like Microsoft Office XP (2001), where it enabled rich, searchable help systems integrated with the Windows shell.[11] Despite later shifts toward web-based help in newer Microsoft products, CHM support persists in Windows 10 and 11 for backward compatibility.[12]| Version | Release Year | Key Features Added | Associated Platforms |
|---|---|---|---|
| 1.0 | 1997 | Basic HTML compilation, TOC/index support | Internet Explorer 4.0, Windows 95 OSR 2.5 |
| 1.1 | 1998 | Improved viewer stability, OS integration | Windows 98, NT 4.0 SP4 |
| 1.3 | 2000 | Unicode support, multilingual satellite DLLs | Windows 2000, IE 5.0 |
| 1.4 | 2002 | Security policies for unsafe commands, bug fixes | Windows XP SP1 |
Technical Specifications
File Format and Structure
Microsoft Compiled HTML Help files, commonly known by the .chm extension, utilize the MIME type application/vnd.ms-htmlhelp.[13] These files are structured as LZX-compressed archives based on Microsoft's proprietary Info-Tech Storage Format (ITSF), which organizes content into a single, self-contained binary file for efficient distribution and viewing.[14][15] The ITSF format begins with a 56-byte initial header starting with the signature "ITSF" (hex: 49 54 53 46), followed by version information (typically 3), header length, a timestamp, language ID, and GUIDs, which precede the section table and content offsets.[16][17] The archive encapsulates various internal files and resources, including HTML pages (.htm or .html) for the core content, table of contents files (.hhc), index files (.hhk), project configuration data derived from the source .hhp file, embedded images, cascading style sheets (.css), and JavaScript scripts for interactivity.[17] These components are stored within compressed content sections, with the file directory managed through an ITSP (ITS Presentation) header that includes "PMGL" chunks for file listings and "PMGI" for indexes, sorting entries by UTF-8 filenames and specifying offsets and lengths.[14] Compression is applied using the LZX algorithm with a 32KB window size and 32KB block size, reset periodically as defined in transformation reset tables within storage sections like "::DataSpace/Storage/| Section | Purpose and Format |
|---|---|
| #SYSTEM | Contains file headers and compression metadata; begins with a DWORD version (2 for CHM 1.0, 3 for later), followed by variable-length entries with codes, lengths, and data such as paths to contents (.hhc) and index (.hhk) files.[17] |
| #IDXHDR | Holds index headers, 4096 bytes long, including topic node counts and sitemap properties, mirroring code 13 from #SYSTEM.[17] |
| #STRINGS | Stores string tables in ANSI or UTF-8 NT format across 4096-byte blocks, encompassing window definitions and merged file information.[17] |
| #WINDOWS | Defines navigation window types (e.g., contents, index, search panes) using HH_WINTYPE structures, with each entry 188 or 196 bytes including name, style flags, and rectangle coordinates.[17] |
| #TOPICS | Maps topics with 16-byte entries per item, including offsets to titles and URLs for quick resolution during navigation.[17] |
Compilation and Content Organization
The compilation of Microsoft Compiled HTML Help (.chm) files begins with the creation of a project file in HTML Help Project (.hhp) format, which serves as the central configuration for assembling the help system's content. This text-based file specifies the locations of source HTML topic files, table of contents (.hhc) files, index (.hhk) files, and other assets such as images, using relative paths to maintain organization. It also defines key options including the compiled file's title, default language (e.g., English or other locales via LCID codes), and compilation parameters like the output filename and binary compatibility settings. Additionally, the .hhp file can include aliases to map topic names to keywords or internal IDs, facilitating navigation and search integration.[18] During compilation, typically performed by the HTML Help Compiler (hhc.exe or hha.dll), all specified source files are processed and compressed using the LZX algorithm, a variant of LZ77 designed for efficient handling of text and binary data. This compression is applied automatically to HTML files, images, scripts, and other embedded resources, resulting in a single self-contained .chm file with no external dependencies required for viewing. The process significantly reduces the overall file size compared to the uncompressed sources, enabling easier distribution. Compression levels are fixed without user-selectable options in the standard tools, ensuring consistent output.[19][3] Content organization within the project relies on relative linking among HTML files, allowing for a hierarchical structure that mirrors the .hhc table of contents and .hhk index. HTML topics can embed JavaScript for interactivity, CSS for styling, and ActiveX controls for enhanced functionality, all of which are compiled directly into the .chm without altering their relative references. The compiler automatically generates a full-text search index by extracting keywords from the .hhk file and scanning HTML content, enabling users to query topics efficiently at runtime. This workflow ensures that the help system's navigation and discoverability features are preserved and optimized during assembly.[3][18] The final output is a monolithic .chm file containing all compressed assets, along with embedded metadata such as the creation date, compiler version, and default window properties (e.g., size, position, and navigation pane visibility) defined in the .hhp file's [WINDOWS] section. This single-file format encapsulates the entire help system, ready for integration into software applications or standalone distribution.[3][18]Software and Tools
Viewers and Runtime Environment
The primary viewer for Microsoft Compiled HTML Help (CHM) files is the HTML Help Executable, hh.exe, which is integrated into Microsoft Windows operating systems.[20] This executable was first introduced with Internet Explorer 4.0 in 1997 and remains supported on Windows 10 and Windows 11 as of 2025.[20][2] Upon opening a CHM file, hh.exe launches the Help Viewer, which renders the content using components derived from Internet Explorer's rendering engine.[21] The runtime environment features a standard tri-pane interface designed for efficient navigation and content display.[22] The navigation pane includes tabs for table of contents, index, and full-text search, allowing users to browse topics hierarchically or query specific terms.[22] The topic pane displays the selected HTML content, while a toolbar provides controls such as Home, Refresh, and Stop for basic browsing actions.[22] For programmatic integration, hh.exe supports command-line invocation with parameters; for example, the/mapid switch opens a file to a specific topic using a context ID, and switches like -800 or -title configure window size and title for embedded use in applications.[23]
CHM files are natively supported only on Windows via hh.exe, with limited cross-platform compatibility.[24] On Linux and macOS, partial viewing is possible through compatibility layers like Wine, which emulates the Windows runtime, or dedicated third-party tools such as xCHM, an open-source viewer built on the CHMLIB library.[24][25] These alternatives may not fully replicate advanced navigation or ActiveX features due to platform differences.[24]
By default, the runtime enforces Windows security zones to mitigate risks, blocking or restricting CHM files downloaded from the internet to prevent potential script execution.[26] Users must unblock such files via file properties or move them to a trusted local zone for full access.[26] Window customization is defined during compilation via the [WINDOWS] section in the project file, enabling authors to specify pane visibility, size, position, and toolbar options for tailored runtime behavior.[27]
Authoring Tools for Creation
The primary authoring tool for creating Microsoft Compiled HTML Help (CHM) files is the free Microsoft HTML Help Workshop, which has been available since its version 1.3 release in 2000 and remains the latest version as of 2009, with no subsequent updates from Microsoft.[2] This tool includes the graphical user interface component Hhw.exe for project setup and management, alongside the command-line compiler Hhc.exe, which processes source files into the final .chm output.[28] Designed for developers and technical writers, it enables the assembly of help systems from standard web technologies, ensuring compatibility with Microsoft's ecosystem for software documentation.[21] The typical workflow in HTML Help Workshop begins with creating a project file (.hhp) through the GUI wizard or manually, where users specify source files such as HTML topics, table of contents (.hhc), and index (.hhk) files.[27] Authors import HTML pages, CSS stylesheets, images, and other assets into the project, organizing them via wizards for contents and index generation or by editing the .hhc and .hhk files directly in a text editor.[29] Compilation occurs by selecting the project in Hhw.exe and clicking the compile button, which invokes Hhc.exe to bundle everything into a single .chm file, applying compression and navigation structures.[30] However, older versions like 1.3 exhibit limitations, such as incomplete Unicode support, relying on legacy ANSI encodings that can cause issues with international characters in file names, contents, or topics unless workarounds like code pages are applied.[31][32] Several third-party tools address the Workshop's age and constraints by providing modern interfaces while leveraging its compiler for CHM output. HelpNDoc offers a WYSIWYG editor for authoring content in a word-processor-like environment, automatically generating required .hhc, .hhk, and .hhp files before exporting to CHM via the Microsoft compiler, with built-in fixes for Unicode and other legacy issues.[31] FAR HTML serves as a command-line suite of utilities for advanced users, enabling batch manipulation of HTML, XML, and help project files to build .hhp-compatible structures for CHM compilation without a full GUI.[33] ClickHelp, a cloud-based platform, allows collaborative authoring of topics in a web editor with import/export capabilities, producing CHM files through integrated compilation that supports responsive design elements adapted for the format.[34] These tools are frequently integrated with external HTML editors for content creation, such as Adobe Dreamweaver for visual layout and scripting or Visual Studio Code for code-based editing of topics, before importing into the Workshop or alternatives for final CHM assembly—essential for producing help files aligned with Microsoft's standards.[33][35]Utility Software for Manipulation
Utility software for manipulating Microsoft Compiled HTML Help (CHM) files enables users to extract, edit, convert, or inspect the contents of existing compiled files without necessarily rebuilding them from source. These tools are particularly useful for reverse engineering, migration to modern formats, troubleshooting, or updating legacy documentation. Decompilers and extractors treat CHM files as archives, allowing access to embedded HTML, table of contents (TOC), index, and other resources.[36] Decompilers such as 7-Zip provide a straightforward way to unpack CHM files by treating them as compressed archives supporting the LZX algorithm. Users can right-click a CHM file in Windows Explorer and select extraction options to retrieve all internal files, including HTML pages and navigation aids, into a folder structure. This method preserves the original file intact and is ideal for quick inspections or backups. Similarly, the freeware CHM Decoder utility decompiles CHM files into a complete folder of loose HTML files, enabling further manipulation without proprietary software. Microsoft's own hh.exe executable, part of the HTML Help system, supports decompilation via the command-line switch-decompile <destination_folder> <chm_file>, which copies the contents to a specified directory for analysis or reuse.[37][38][39][36]
Editors like CHM Editor allow direct modification of CHM contents, including HTML files, TOC, and indexes, without full recompilation. This tool features a WYSIWYG interface for batch updates, such as translating multiple files or adjusting links, making it suitable for maintaining large documentation sets. For instance, users can open a CHM, edit specific sections, and save changes while retaining the compiled format's efficiency. Help Explorer from KAMA Software offers portable viewing and basic manipulation capabilities, particularly for network-accessed CHM files, bypassing common Windows restrictions on remote help viewing.[40][41]
Converters facilitate migration from CHM to open formats for cross-platform compatibility. Calibre, an open-source e-book management tool, imports CHM files and exports them to EPUB or PDF, preserving structure and hyperlinks where possible through its built-in viewer and conversion engine. The command-line tool arCHMage extracts CHM contents to HTML, plain text, or PDF, supporting scripted workflows for bulk processing. These utilities help transition legacy CHM documentation to web-based or printable alternatives.[42]
Specialized utilities include Microsoft's hh.exe with command-line switches for inspecting CHM properties, such as -wininfo to display window information or -mapid for context-specific metadata extraction, aiding in troubleshooting and verification of file defaults like title and navigation settings. This approach is essential for diagnosing issues in deployed help systems or preparing for format migrations.[23]
