How to decode a .chm file?

I'd like to extract content of old .chm file into individual html files.

Is there an app or command line tool for this?


For $1 (instead of $18 for FileJuicer) you might consider this app:

CHM Decompiler

It worked correctly for me. (I have no relationship with the developer, just a happy customer.)


This is pretty easy to do for free you just have to use Terminal and install Homebrew and chmlib.

  1. Open Terminal. (/Applications/Utilities/)
  2. Install Homebrew by visiting http://brew.sh/ and follow the installation instructions. Or just copy paste this command into Terminal and run it.

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  3. After the install is complete type brew install chmlib in Terminal and press enter.

  4. Move the file you want to extract to your Desktop.
  5. Go back to Terminal and type:

    extract_chmLib ~/Desktop/name_of_the_file.chm ~/Desktop/name_of_the_file
    

    Just be sure to replace name_of_the_file.chm with the actual name of the file. This will create a new folder on your desktop.

  6. Open the folder and double click the file index.html. This will open the document in your web browser.


Perhaps http://echoone.com/filejuicer/formats/chm will do the job for you.

FWIW, my chm to HTML workflow differs though. I use iCHM app (http://www.macupdate.com/app/mac/28171/ichm) for OS X to convert chm to PDF to preserve formatting. After editing it (using Adobe Acrobat) as necessary, only then do I convert to HTML.