Foundry vs Hardhat: Solidity frameworks compared
Foundry and Hardhat are both free, open-source toolkits for building, testing and deploying Solidity contracts. Foundry is a set of Rust command-line tools (forge, cast, anvil, chisel); Hardhat 3 is a Node.js environment built around plugins that runs both Solidity and TypeScript tests. The main differences are the language you test in and how much you want a JavaScript project around your contracts.
| Foundry | Hardhat | |
|---|---|---|
| Chains | ||
| Best for | Fast Solidity build, test and deploy toolkit | Plugin-based TypeScript environment for EVM contracts |
| Confirmed features | Compile contracts · Local test chain · Testing framework · Fuzz or property testing · Fork mainnet for tests · Deployment scripting · Contract verification · Build and sign transactions | Compile contracts · Local test chain · Testing framework · Fuzz or property testing · Fork mainnet for tests · Deployment scripting · Contract verification |
| Free option | Free and open source, dual-licensed MIT or Apache-2.0. Install with foundryup. Source: Foundry free option | Free and open source (MIT on npm). Hardhat 3 needs Node.js v22.13.0 or later. Source: Hardhat free option |
| Price | Free (open source) | Free (open source) |
| Maker | Foundry contributors (foundry-rs) | Nomic Foundation |
| Last checked | Oct 25, 2026 (source: Foundry listing) | Oct 29, 2026 (source: Hardhat listing) |
| Try it | Visit Foundry | Visit Hardhat |
Pick Foundry if…
Your team wants to write tests in Solidity and work from the command line: forge builds, tests and fuzzes, cast sends transactions and reads chain data, and anvil runs a local node. No Node.js project is required.
Pick Hardhat if…
Your team lives in TypeScript: Hardhat 3 runs Solidity tests and TypeScript tests with viem or ethers.js, deploys with Hardhat Ignition, and adds features through plugins. Its docs also cover Foundry compatibility if part of the team uses forge.
Our verdicts
Foundry
A Rust toolkit (Forge, Cast, Anvil, Chisel) for compiling, testing, deploying and poking at Solidity contracts, popular for fast tests and fuzzing. Free and open source. Its docs name Ethereum and otherwise work on any EVM chain, so we don't give it chain-specific badges.
Hardhat
A plugin-based TypeScript development environment to compile, test, debug and deploy EVM contracts, with a large plugin ecosystem. Free and open source. Its docs name Ethereum mainnet and testnets and otherwise target any EVM chain.
See every pick in Smart contracts & SDKs. Prices change often, so confirm on each maker's site before you buy.
Know when chain support changes
One short email when we add tools or a tool adds, drops or deprecates a chain. Nothing new, no email. Unsubscribe anytime.