Description
stockfish.js is the Stockfish chess engine compiled to JavaScript and WebAssembly with Emscripten, so it can run in a web browser. It is maintained by the lichess.org team, which uses it for local computer analysis on the site. The build runs inside a web worker, so the engine can be driven from a page without blocking it. Because a web worker is single-threaded, the port is limited to one thread. Several changes were made to the original engine: the main iterative deepening loop was split so a search can be interrupted, total memory is capped at 32 MB, Syzygy tablebases are disabled and the benchmark is removed. The release is about 1.4 MB uncompressed and about 250 KB gzipped. The README includes build steps that use Emscripten and uglifyjs, a Docker option and usage notes. The project notes that active development has moved to a separate repository, lichess-org/stockfish-web, and that this one receives bug fixes to keep supporting older browsers.…
Highlights
- Stockfish chess engine running in the browser
- Runs in a web worker, single-threaded
- Interruptible search with a 32 MB memory cap
- About 250 KB gzipped
- Build with Emscripten or Docker
Ratings & Reviews
No ratings yet
Be the first to rate Stockfish.js.
People also visit
Stockfish.js FAQ
What is stockfish.js?
The Stockfish chess engine compiled to JavaScript and WebAssembly, so it can run in a web page.
Who maintains it?
The lichess.org team. It is used for local computer analysis on lichess.org.
How big is it?
About 1.4 MB uncompressed and about 250 KB gzipped.
Is it still in active development?
The README says active development has moved to lichess-org/stockfish-web. This repository receives bug fixes to keep older browsers working.
How do I build it?
The README gives build steps that install Emscripten and uglifyjs, and a Docker option.
What are the best Stockfish.js alternatives?
Popular alternatives to Stockfish.js include Lila Tablebase, Lichess Bot and ButtFish. See all Stockfish.js alternatives

