Hardhat is a free, open source Ethereum development environment built for professional developers who write, test and maintain smart contracts. It suits teams and individuals who want to automate repetitive work instead of running every check by hand. The project is hosted on GitHub and written in JavaScript and TypeScript, so most daily work happens in a language many web developers already know.
Its core job is to handle the frequent tasks of contract development: running tests, scanning code for mistakes and interacting with deployed smart contracts from scripts. Hardhat is not a wallet and does not hold funds, so it is best understood as a workshop for building software rather than a place to store crypto. This guide covers what it does, how to get it running on Windows, and how it compares with similar tools.
What Is Hardhat and Who Is It For?
Hardhat is a development environment for Ethereum, the blockchain network that runs smart contracts. A smart contract is a program stored on the chain that executes automatically when certain conditions are met. Writing one differs from writing an ordinary app, because a mistake may be costly to fix once the code is live.
Hardhat is designed for professionals: developers building decentralized applications, engineers maintaining existing contract code, and teams that need repeatable checks before each release. It is also useful for people learning Ethereum development who want a structured local workflow instead of piecing tools together manually.
A typical team might keep contracts in a Git repository, write tests for each function, and run a script that deploys to a test network before anyone touches production. If you mainly want to trade or hold crypto, Hardhat is not the right tool. Its audience is the people building the software behind those services.
Why Smart Contract Testing Matters Before Deployment
Once a smart contract is deployed, fixing it is often difficult. Many contracts are designed so their code cannot be changed in place, which makes problems found after launch hard to correct. Testing before deployment is therefore the main safeguard for most projects.
Consider a simple token contract with a transfer function. A useful test checks that balances update correctly after a transfer, that a transfer larger than the sender's balance fails, and that only authorized accounts can create new tokens. Each of these checks protects against a specific kind of mistake.
Edge cases deserve special attention. Zero-value transfers, unusual addresses and repeated calls can reveal logic errors that a quick manual check would miss. Running these scenarios in a local environment lets developers see the results immediately, without spending real funds, and repeat the same suite after every change.
Key Terms Behind Ethereum Development Tools
Ethereum development uses a handful of terms you will meet constantly. A transaction is a signed instruction sent to the network, such as a transfer or a call to a contract function. Gas is the unit that measures the computing work a transaction requires, and it determines the fee paid on a public network.
Deployment means publishing compiled contract code to a network so it can be used. Compiling turns human-readable source code into the bytecode and interface details that the network and your scripts need. Before deployment, developers often run a local network, which is a private test chain on their own machine.
Knowing these terms makes the rest of the toolchain easier to follow. When a test fails, you can tell whether the problem is in the contract logic, the script that calls it, or the network settings the script uses.
Key features
Automated Testing
Automatic Code Checks
Smart Contract Interaction
JavaScript and TypeScript Workflow
Supported coins
The documentation names Ethereum (ETH) as the network Hardhat is built for. Work done with the tool therefore centers on Ethereum-based smart contracts. If you work on a different blockchain, such as Solana, you will need a tool designed for that chain, like the Anchor framework listed in the related programs below.
How to install Hardhat on Windows
- 1
Install Node.js
Hardhat is installed through npm, the package manager that ships with Node.js. Download the current LTS version of Node.js only from the official website and run the installer with default options. Then open PowerShell or Command Prompt and run node -v and npm -v to confirm both commands respond.
- 2
Create a Project Folder
Make an empty folder for your project, open a terminal inside it and run npm init -y. This creates a package.json file that records your project's dependencies, so every installation step is tracked in one place.
- 3
Install Hardhat and the Toolbox
Run npm install --save-dev hardhat, then npm install --save-dev @nomicfoundation/hardhat-toolbox. The toolbox bundles commonly used plugins, and its latest release is 7.0.0. Installing both keeps the project consistent across machines.
-
Check Windows Notes and Initialize
Hardhat is listed as building for Windows, but releases and dependencies change over time. Open the project's GitHub Releases page and read the notes before upgrading. Then run npx hardhat init in your project folder and choose the sample project to confirm everything works.
System requirements
- Node.js with npm, since Hardhat is installed and run through npm
- Windows PowerShell or Command Prompt for running commands
- A code editor for writing contracts, tests and scripts
- Enough free disk space for the node_modules folder, which grows with each dependency
How to use Hardhat
Once the project is set up, the daily workflow is short. Hardhat reads its settings from a configuration file in your project, and most of your work happens through a few commands.
- Write your contract in the contracts folder.
- Compile it with npx hardhat compile so Hardhat checks the code and produces the files your scripts need.
- Write tests in the test folder and run them with npx hardhat test.
- Fix any failing tests and repeat until the suite passes.
- Write a deployment or interaction script and run it against a local network before trying any other environment.
- Keep the configuration and scripts in Git so every change is recorded.
Start with a small contract so the cycle feels familiar before you add more complexity.
Pros & cons
- Free and open source, with the code available on GitHub
- Automates tests and routine code checks
- Built on JavaScript and TypeScript, familiar to web developers
- Covers writing, testing and interacting with contracts in one tool
- Public documentation available at hardhat.org
- Requires Node.js and comfort with the command line, which is a barrier for non-developers
- Windows is listed as a build target, so check release notes for your version
- Focused on Ethereum, so other blockchains need separate tools
- Not a wallet or trading tool, so it offers nothing to users who only hold crypto
Is Hardhat safe?
Hardhat is a developer tool rather than a wallet, but it works with accounts and private keys when it deploys contracts, so handle it with care. Download only from the official website or the project's GitHub Releases page, and check the package integrity before installing. Where a release publishes a SHA-256 checksum or signature, verify it before you run the installer. Never store a private key or seed phrase in project files that get committed to Git; use environment variables or a secrets manager instead. Never enter a seed phrase on a third-party website, even one that looks like official documentation. The last code update is dated 2026-10-30, so check the latest version on the official website before you install.
- Official source only. Download from github.com/NomicFoundation/hardhat. Ignore ads and lookalike domains.
- Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
- Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
Alternatives
Hardhat sits alongside several tools that cover parts of the same workflow. Foundry bundles forge, cast and anvil into a toolkit for smart contracts, and many teams choose it for a command-line-first approach. The Solidity compiler, solc, only compiles code, so you would still need other tools for testing and deployment. EthereumStudio is a standalone desktop IDE, which suits people who prefer a graphical interface over scripts. Anchor targets Solana programs, so it is a relevant comparison only if your work is on a different chain. Hardhat's distinguishing trait is its JavaScript and TypeScript foundation, which fits teams already working in those languages.
Specifications
- Price
- Free
- Type
- Open source
- License
- —
- Latest version
- @nomicfoundation/[email protected]
- Last update
- 30 Oct 2026
- Windows support
- Likely (builds for Windows; check releases)
- Source code
- github.com/NomicFoundation/hardhat
Frequently asked questions
Yes. Hardhat is listed as free and open source, and its code is available on GitHub. You do not pay a license fee to use it. Any costs you face come from your own infrastructure, such as running deployments on public networks, where gas fees depend on the network you choose.
Hardhat is listed as building for Windows, so it is generally usable there. Install Node.js first, then run the npm commands in PowerShell or Command Prompt. Check the GitHub Releases page for any Windows-specific notes before starting a new project, since release details can change.
It is safe when you install it from the official website or GitHub and verify the download. Hardhat itself is a development tool, not a wallet, but it can use private keys during deployment. Keep keys out of Git and never type a seed phrase into a site you reached through an ad or a chat message.
No. Hardhat is a development environment for building and testing smart contracts on Ethereum. It does not store coins for you or manage a balance the way a wallet does. Developers may use accounts in scripts for deployment, which is a separate concern from holding funds.
Both are Ethereum development toolkits, but they differ in style. Hardhat is built on JavaScript and TypeScript and fits teams who write scripts in those languages. Foundry centers on its own forge, cast and anvil commands. Many developers try both on a small project before choosing one for a larger effort.
Begin by installing Node.js, creating a project with npm and running the sample setup. Then read the official documentation at hardhat.org, which covers tests, scripts and configuration. Write one small contract, add a test for it and keep running the test until it passes.
Verdict
Hardhat is a strong choice for developers who build and test Ethereum smart contracts and prefer JavaScript or TypeScript. It is free, open source and covers testing, code checks and contract interaction in one place. It is less suitable for people who only want to hold crypto or who are uncomfortable with the command line. Confirm any Windows notes on the release page before you start a project.