A head-to-head comparison of Hardhat and Ethers.js — pricing, the features that actually differ, and which one fits which use case.
The most widely used Ethereum development environment with a robust plugin ecosystem
The long-dominant, complete JavaScript library for Ethereum
These are the 8 capabilities where the two tools genuinely diverge — the rest of their feature sets overlap.
| Capability | Hardhat | Ethers.js |
|---|---|---|
| Local Node | Yes | No |
| Mainnet Forking | Yes | No |
| Test Framework | Mocha + Chai | No |
| Plugin Ecosystem | 90+ plugins | Yes |
| Debugging | Yes | No |
| Deployment System | Hardhat Ignition | No |
| Coverage Reporting | Yes | No |
| Gas Reporting | Yes | No |
| Feature | Hardhat | Ethers.js |
|---|---|---|
| Local Node | ✓ | ✗ |
| Mainnet Forking | ✓ | ✗ |
| Language | JavaScript / TypeScript | JavaScript / TypeScript |
| Test Framework | Mocha + Chai | ✗ |
| Plugin Ecosystem | 90+ plugins | ✓ |
| Debugging | ✓ | ✗ |
| Deployment System | Hardhat Ignition | ✗ |
| Open Source | ✓ | ✓ |
| Coverage Reporting | ✓ | ✗ |
| Gas Reporting | ✓ | ✗ |
Both tools are free to use — costs come from network or usage fees.
Hardhat
Free
Ethers.js
Free
Watch out: JavaScript-based test execution is 5–20x slower than Foundry for large test suites.
Watch out: New-project momentum shifted to Viem.
Hardhat edges ahead on our editorial score (4.7/5), but these tools aren’t straight substitutes. Pick Hardhat when largest plugin ecosystem — 90+ community plugins cover every testing and tooling need matters most to your workflow; pick Ethers.js when long-dominant, battle-tested library is the priority. The deciding factor is usually the trade-off you can least afford — Hardhat means accepting that javascript-based test execution is 5–20x slower than foundry for large test suites, while Ethers.js means new-project momentum shifted to viem.
Hardhat carries the higher editorial rating (4.7/5 vs 4.6/5), but they solve different problems. Hardhat is the stronger pick when you need largest plugin ecosystem — 90+ community plugins cover every testing and tooling need. Ethers.js wins when long-dominant, battle-tested library.
Both tools are free to use, with costs coming from network or usage fees rather than subscriptions.
Hardhat's main limitation is that javascript-based test execution is 5–20x slower than foundry for large test suites. For Ethers.js, new-project momentum shifted to viem. Weigh these against how you actually plan to use the tool.
In most cases yes — many teams run both, using each where it's strongest. Since Hardhat leads on largest plugin ecosystem — 90+ community plugins cover every testing and tooling need and Ethers.js on long-dominant, battle-tested library, the two are often complementary rather than mutually exclusive.