Remix is a browser-based IDE for Solidity. There is nothing to install — open the URL, write code, and deploy. It is the fastest way to go from zero to a deployed contract and the best environment for learning Solidity.
Prerequisites
- A browser with MetaMask installed
- Sepolia ETH — get some from the faucets page
- No Node.js, no terminal, no configuration
1. Open Remix
Go to remix.ethereum.org. You will see a file explorer on the left and an editor in the centre.
In the file explorer, open contracts/ and delete the example files. Create a new file called Counter.sol.
2. Write the contract
Paste this into Counter.sol:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract Counter {
uint256 public count;
event Incremented(address indexed by, uint256 newCount);
function increment() external {
count += 1;
emit Incremented(msg.sender, count);
}
function reset() external {
count = 0;
}
}
3. Compile
Click the Solidity compiler icon in the left sidebar (looks like <S>).
- Set the compiler version to
0.8.24 - Click Compile Counter.sol
A green tick appears when compilation succeeds. The ABI and bytecode are now ready.
4. Connect MetaMask to Sepolia
Open MetaMask and switch to the Sepolia test network. If Sepolia is not in your network list:
- Open MetaMask → Settings → Networks → Add a network
- Fill in:
- Network name: Sepolia
- RPC URL:
https://ethereum-sepolia-rpc.publicnode.com - Chain ID:
11155111 - Currency symbol: ETH
- Block explorer:
https://sepolia.etherscan.io
Make sure your wallet has Sepolia ETH before continuing.
5. Deploy
Click the Deploy & Run Transactions icon (rocket ship) in the left sidebar.
- Environment: Select Injected Provider — MetaMask
- MetaMask will ask you to connect — approve it
- Contract: Select
Counter - Click Deploy
MetaMask shows a transaction confirmation. Click Confirm. After a few seconds the contract appears under Deployed Contracts at the bottom of the panel.
6. Interact
Expand the deployed contract. You will see buttons for every public function and variable:
- Click count to read the current value (returns
0) - Click increment → MetaMask prompts for a transaction → confirm it
- Click count again → returns
1 - Click reset to set count back to zero
Every state-changing call costs a small amount of Sepolia ETH. Read-only calls (like count) are free.
7. Verify on Etherscan
Copy the deployed contract address from Remix. Go to sepolia.etherscan.io and paste it in the search bar.
You will see your contract, its balance, transactions and emitted events. To make the source code publicly readable:
- Click the Contract tab → Verify and Publish
- Select compiler version
0.8.24, licence MIT - Paste the
Counter.solsource code - Submit — Etherscan verifies and marks the contract with a green tick
Remix tips
| Feature | How to access |
|---|---|
| Import from GitHub | import "github.com/OpenZeppelin/openzeppelin-contracts/..." |
| Debugger | Run → click the bug icon next to a failed transaction |
| Unit tests | Create a file ending in _test.sol, click the test icon |
| Static analysis | Plugin manager → Solidity Static Analysis |
| Local filesystem | Plugin manager → Remixd (connects to your local folder) |
When to move beyond Remix
Remix is great for prototyping, but consider moving to Foundry or Hardhat when you need:
- Automated tests in CI
- Scripts for complex deployment sequences
- A team working from a shared git repository
- Gas optimisation and fuzzing