Need help with workerize?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

4.0K Stars 103 Forks 60 Commits 18 Opened issues


🏗️ Run a module in a Web Worker.

Services available


Need anything else?

Contributors list

💖 Using Webpack? You want workerize-loader ➡️


Workerize npm travis

Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.

  • Bundles a tiny, purpose-built RPC implementation into your app
  • If exported module methods are already async, signature is unchanged
  • Supports synchronous and asynchronous worker functions
  • Works beautifully with async/await
  • Just 800 bytes of gzipped ES3


npm install --save workerize


Pass either a function or a string containing code.


let worker = workerize(`
    export function add(a, b) {
        // block for half a second to demonstrate asynchronicity
        let start =;
        while ( < 500);
        return a + b;

(async () => { console.log('3 + 9 = ', await worker.add(3, 9)); console.log('1 + 2 = ', await worker.add(1, 2)); })();


MIT License © Jason Miller

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.