Emacs Spell-Checking (Hunspell) in Windows

Last Updated: Sep 21, 2026

Most GNU/Linux distributions ship with a Western-language spell checker like Ispell out of the box. Of course, Windows doesn’t make such a convenient tool easy to install.

I use Ispell for English spell-checks in Emacs, but getting the same thing working on Windows was not so easy, so I’m writing it down.

First, it seems that on Windows Hunspell is more popular (or maybe easier to install). I thought there could be no big difference between them so I chose to go with Hunspell.

Procedures

Open PowerShell as administrator and run the following, one at a time:

Set-ExecutionPolicy Bypass -Scope Process -Force 
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

If it does not work, check the installation guide.

Next, install Hunspell via choco.

choco install hunspell.portable

Then download the English (or whichever language you want) dictionary from LibreOffice Extensions. The downloaded file is an oxt, but it’s basically a ZIP so you can extract .aff and .dic. Place the dictionary files somewhere that is on Hunspell’s search path. You can find Hunspell’s path by running

hunspell -D

Then run

hunspell -D -d en_US NUL

Replace en_US with whichever language you want to install, but you need to have associated .aff and .dic.

That’s the setup done. Now just tweak your .emacs and you should be good. If you installed Hunspell via choco, it’s added to PATH automatically; otherwise, either add it to PATH manually or put the full path on the third line.

(setenv "LANG" "en_US") 
(setenv "DICTIONARY" "en_US") 
(setq-default ispell-program-name "hunspell.exe")

This might just work, but on newer versions of Emacs it sometimes doesn’t, for some reason. The error looks like this:

ispell-phaf: No matching entry for en_US in ‘ispell-hunspell-dict-paths-alist’.

According to this page, the fix is to patch ispell.el. You can find it either directly or inside its GZIP (ispell.el.gz) in Emacs’ installation directory. For example:

share/emacs/31.1/lisp/textmodes/ispell.el.gz

At the moment (31.1) that’s line 1134:

- (affix-file (concat dict ".aff"))) 
+ (affix-file (concat (file-name-sans-extension dict) ".aff")))

Apply the patch, then finally run M-x byte-compile-file path/to/ispell.el.gz, and it should work. If it complains about gzip command not found, just install it from GnuWin and add the binary directory to PATH.