You are currently viewing Web3.js vs Ethers.js — Fully Guide |  by Alexandr Kumancev |  Coinmonks |  Oct, 2022

Web3.js vs Ethers.js — Fully Guide | by Alexandr Kumancev | Coinmonks | Oct, 2022

These days, crypto developers can choose among multiple programmable blockchains to build on. And, while you can hear the term “Ethereum killers” being thrown around quite often, the first mover remains the king. As such, the majority of blockchain developers are still focus on Ethereum. Moreover, since other programmable chains tend to follow Ethereum’s lead, most of them are EVM-compatible. Thus, the same JavaScript libraries can be used to deploy dApps (decentralized applications) across multiple chains. With that in mind, you ought to take a closer look at Web3.js vs Ethers.js comparison.

Herein, you will get a chance to learn what Web3.js and Ethers.js are. You’ll also learn about JavaScript modules. Moreover, I’ll take a quick overview of the modules of each of the two JavaScript ETH libraries. However, the core of this article is the Web3.js vs Ethers.js comparison. It will help you establish a clear picture of the benefits and disadvantages of each library. Moreover, it should also make things clearer why the majority of the crypto industry is moving towards the younger of the two libraries.

As mentioned above, Web3.js is an open-source library or a collection of JavaScript (JS) libraries. If you can’t answer “what is JavaScript?”, make sure to read our guide on this popular programming language. I’ve also mentioned in the introduction that Web3.js serves for Ethereum-based projects. As such, it enables developers to interact with the Ethereum blockchain when creating dApps. Moreover, it is worth pointing out that the Web3.js library was built by the Ethereum Foundation. Thus, it has a rather large community behind it, which is usually an added value.

Furthermore, Web3.js essentially incorporates functions for communicating with Ethereum nodes. This communication is performed via the JavaScript Object Notation — Remote Procedure Call (JSON-RPC) protocol. In case this is the first time you’re hearing about Web3, make sure to jump over to my switching guide to Web3. Moreover, before taking on our Web3.js vs Ethers.js comparison, we need to ensure you all know what JS modules are. For now, note that both Web3.js and Ethers.js contain modules.

js modules

You can think of JavaScript modules as book chapters or sections. Moreover, this principle of compartmentalization is something all experienced programmers apply. As such, you can see many programs and programming libraries divided into modules. And, both ETH JS libraries covered herein follow that practice.

Furthermore, modules are basically clusters of code. So, when the JavaScript programming language is in question, modules represent a cluster of meaningful combinations of words and special characters. Also, keep in mind that each module normally covers specific functionality within a larger program. However, circling back to the book chapter analogy, unlike book sections, good programming modules can be removed, added, or shuffled as necessary. Moreover, all these alterations don’t affect the system as a whole. As such, they are essentially highly self-contained with specific functionality. In addition, dividing programs and libraries into modules also makes maintainability and reusability much simpler. Nonetheless, if you are familiar with any other coding languages ​​(eg: Java or Python), you may think of classes. They are a very close analogy to modules.

Now that you know what JS modules are, let’s take a quick overview of Web.js modules:

  • Web3.eth: The Eth module is there for interacting with the Ethereum network. It offers several sub-modules, including Web3.eth.subscribe, Web3.eth.contract, Web3.eth.accounts, Web3.eth.personal, and more.
  • Web3.*.net: The Net module is there for interacting with network properties. Of course, it may be used as a sub-module to interact with Ethereum (
  • Web3.bzz: The Bzz module is there for interacting with the swarm network.
  • Web3.shh: The Shh module is there for interacting with the whisper protocol.
  • Web3.utils: This module provides utility functions for Ethereum dApps and other web3.js packages.

Like with most programming languages, platforms, and libraries, it is best to use their documentation for more details. You can find the link to the Web3.js documentation in the “Web3.js vs Ethers.js — Documentation” section below.

ether js

Ethers.js is also an Ethereum JavaScript library that enables developers to communicate and interact with the Ethereum network. Moreover, it is an open-source library with the MIT License. So, what’s the point of Ethers.js if it serves the same purpose as Web3.js? Well, keep in mind that having options is normally a good thing. As such, Ethers.js offers an impressive (in many aspects a superior) alternative to Web3.js. However, just like with any product out there, Ethers.js and Web3.js have their own drawbacks and benefits. More on that in the “Web3.js vs Ethers.js — A Comparison” section below.

Just like Web3.js, Ethers.js also has several modules. To be exact, there are four modules in this JS library: Ethers.contract, Ethers.provider, Ethers.utils, and Ethers.wallets. These modules are the core of the Ethers.js’ API (Application Programming Interface). Moreover, let’s take a quick overview of all four Ethers.js modules:

  • Ethers.Provider: This module enables you to establish a connection with the Ethereum blockchain. You use it to issue queries and send signed transactions. Through this module, Ethers.js users get to change the state of the blockchain.
  • Ethers.Contract: You use this module to deploy and interact with smart contracts. While deploying smart contracts is one of the main purposes of Ethers.Contract, it has more to offer. As such, it also packs functions that enable developers to ‘listen’ to smart contract events (sync and index smart contract events). Furthermore, you also use this module to get information about smart contracts and call particular functions provided by smart contracts.
  • Ethers.Utils: You will use this module when you want to format data and process user inputs. As such, Ethers.utils makes building dApps a whole lot easier.
  • Ethers.Wallet: As you can assume based on the ‘.wallet’, Ethers.Wallet provides a way to connect to any existing Ethereum address (an Ethereum wallet). On top of that important feature, this module also enables you to create new wallets and sign transactions.

So far we’ve covered the basics of both JS ETH libraries, including their modules. As such, you should have a proper understanding of what Ethers.js and Web3.js are. Also, you now know what they are used for. As such, you understand they are very important for developing dApps on the Ethereum blockchain or other EVM-compatible chains.

In the following subsection, I’ll cover the main aspects of both JS libraries. As a result, you will be able to use this Web3.js vs Ethers.js comparison to determine which of the two options to use. However, please note that you do not need to overthink this. I’m assure you that you can work successfully with either of the two JS ETH libraries. With that said, let’s do the Web3.js vs Ethers.js comparison.

In the subsections that follow, we will compare Web3.js vs Ethers.js in the following aspects:

  • The team behind it
  • Popularity
  • Downloads
  • Updates
  • Testing
  • Web performance
  • Documentation
  • License
  • Web3.js: It is a project of the Ethereum Foundation (a non-profit organization). With an entire organization behind a project, there are more developers offering support. Unfortunately, this also means that there is no clear responsibility as to who should ensure that all is in order.
  • Ethers.js: It was developed and is maintained by Richard “RicMoo” Moore. This clearly puts full responsibility on RicMoo.

As you can see, each of the backing types has its pros and cons. What kind of backing do you prefer?

Here, you need to keep in mind that Web3.js was created first. As such, it makes sense that it wins the overall use cases title. By leaning on GitHub’s data, Web3.js has more stars and more repositories. On the other hand, when it comes to the speed of growth in popularity, Ethers.js comes on top.

Another way to compare these two JS libraries is to look at the download. However, the overall number of downloads doesn’t paint a clear picture. Since Web3.js has been on the scene noticeably longer it has an unfair advantage. Luckily, we can rather focus on daily downloads. According to, Ethers.js is a winner in that aspect.

It is important to go with a library that is updated regularly and properly. That way it ensures that the support team removes all known bugs and adds new features in a timely manner. According to available reviews and devs feedback, both ETH JS libraries are relatively updated regularly.

When it comes to testing, Ethers.js may be the better choice. It has pre-written tests and clear documentation of its tests. However, you should keep in mind that this conclusion is based on previous versions of the Ethers.js. With the new version, things may be different.

Ethers.js loads slightly faster thanks to its noticeably smaller size, which may offer better performance. Though, the size factor plays a noticeable role only when it comes to small dApps. Also, it is important to point out that there is not sufficient speed test data for the exact same dApps using Web3.js and Ethers.js. Thus, any performance advantage remains to be confirmed.

According to my experience and comments from developers, we can say that neither of the two ETH JavaScript libraries has perfect documentation. However, they both provide you with more than enough details to get going. Then, it is up to you to cover the key aspects of your interests. This is also the way you will determine, which one better fits your project. Moreover, here are the links to the currently latest versions (at the time of writing) of documentation for each library:

Furthermore, you should also keep in mind that JavaScript itself is always evolving, thus its libraries must be updated as well. Things evolve even faster in the blockchain world. As such, teams release updates and newer visions of both ETH JavaScript libraries quite often.

  • Web3.js: It has an LGLv3 license.
  • Ethers.js: It has an MIT license.

If your project has specific requirements regarding the license, you need to pay attention to that. In some cases, it is smart to hire a license expert. A professional will help you determine which of the two ETH JavaScript libraries is more suitable for you.

We’ve covered a lot of ground and have managed to wrap up our Web3.js vs Ethers.js comparison. By now you know that both JS ETH libraries offer several modules that enable you to interact with the Ethereum chain. Moreover, you’ve learned that each library has its advantages and disadvantages. However, the blockchain industry as a whole is slowly migrating towards a younger alternative — Ethers.js.

Thank you for your support!👐🏼

New to trading? Try crypto trading bots or copy trading

Leave a Reply