English Words Dictionary
370,105 English words. Plain text and compact binary formats, served via GitHub Pages.
Downloads
| File | Format | Size |
|---|---|---|
| words_alpha.dict.bin | Binary (DFS-serialized trie) | 1004 KB |
| words_alpha.dict.bin.gz | Gzipped binary | 589 KB |
| words_alpha.txt | Plain text (one word per line) | 4136 KB |
| decompress.js | ES module decompressor | 1 KB |
Usage
Plain text
const resp = await fetch('https://wow-look-at-my.github.io/english-words/words_alpha.txt');
const words = (await resp.text()).split('\n').filter(Boolean);
Binary format
import { decompress } from 'https://wow-look-at-my.github.io/english-words/decompress.js';
const resp = await fetch('https://wow-look-at-my.github.io/english-words/words_alpha.dict.bin');
const buf = new Uint8Array(await resp.arrayBuffer());
const words = decompress(buf); // string[], 370,105 words sorted alphabetically
Gzipped binary (smallest download)
import { decompress } from 'https://wow-look-at-my.github.io/english-words/decompress.js';
const resp = await fetch('https://wow-look-at-my.github.io/english-words/words_alpha.dict.bin.gz');
const ds = new DecompressionStream('gzip');
const decompressed = resp.body.pipeThrough(ds);
const buf = new Uint8Array(await new Response(decompressed).arrayBuffer());
const words = decompress(buf);
Binary format spec
The .dict.bin format is a DFS-serialized trie. The entire dictionary
is stored as a tree where shared prefixes are represented once. Each trie edge
is encoded as a single byte:
Header: 4 bytes (word count as uint32 LE)
Body: 1 byte per trie edge (DFS order)
bits 0-4: character (0-25 for a-z)
bit 5: end-of-word (this edge completes a valid word)
bit 6: has children (the target node has outgoing edges)
bit 7: last sibling (last child of the parent node)
1004 KB raw, 589 KB gzipped — 45% smaller than gzipping the plain text.