About this tool
What this generator answers
The ERC Token Generator outputs a complete, compilable Solidity contract for either an ERC-20 fungible token or an ERC-721 NFT collection. The contract inherits from audited OpenZeppelin Contracts 5.x modules, which means the heavy lifting around safety and standards compliance is done by code that thousands of production deployments rely on.
Each feature toggle adds the corresponding OpenZeppelin extension: mintable adds a guarded mint function, burnable adds Burnable, pausable adds Pausable, capped enforces a hard supply ceiling, permit adds EIP-2612 gasless approvals, enumerable adds totalSupply and tokenByIndex for NFTs.
How to use it
Pick ERC-20 or ERC-721 at the top. Fill in the token name and symbol. Decide whether the supply needs to grow over time (mintable), whether holders can destroy their own tokens (burnable), whether the owner needs an emergency stop (pausable), and whether there is a hard cap.
The generated Solidity updates on every toggle. Copy it into Remix or your local Foundry / Hardhat project, compile with 0.8.24, and deploy via Injected Provider for your wallet. Verify the deployed address on the chain explorer and lock the OpenZeppelin version in your dependency file.
How the contract is composed
Every generated contract begins with the SPDX license, the pragma, and the imports. The base contract for ERC-20 is OpenZeppelin's ERC20; for NFTs it is ERC721. Each enabled feature appends one extension import and one entry in the inheritance list. The constructor wires up name, symbol, ownership, and any feature specific arguments (cap for capped, permit name for EIP-2612).
Override functions appear at the bottom only when needed, for example when ERC721URIStorage and ERC721Enumerable both extend transfer hooks. The override resolution follows OpenZeppelin's documented pattern.
Where token contracts usually go wrong in production
The most common mistake is forgetting that mintable plus an unbounded mint function is centralised supply control. If the owner key is compromised or governance is captured, supply can be diluted to zero. Pair mintable with capped, role based access control, or a multisig.
The second most common mistake is missing decimals. ERC-20 stores balances as raw integers with no decimal point. A premint of 1,000,000 with the standard 18 decimals is actually 10^24 wei equivalents. Always multiply by 10 ** decimals() in mint calls, the generator does this in the constructor for you.
When this generator is the right starting point
Use it when you want an audited base for a standard token launch, when you are prototyping a tokenomics design, when teaching a Solidity workshop, or when you need a fast deploy of a community NFT.
Do not use the generated contract verbatim for high stakes launches without a security review. Real launches frequently need extras (vesting, role based access, cross chain bridges, snapshot support) that this generator does not include. Treat the output as a clean starting point, not a finished product.
Launching a token that needs an audit?
Tokenomics, access control, and upgradeability are decisions that compound risk if rushed. Bring the design and the contract for a focused review.
Book a token launch reviewFrequently asked questions
- How do I create an ERC-20 token for free?
- Use a free ERC-20 token generator to produce the Solidity source for an audited OpenZeppelin based contract, then compile and deploy it yourself with Remix, Foundry, or Hardhat. The generator never charges, never takes a fee from your deployment, and never holds your private key. The only real cost is the on chain gas you pay to deploy the contract to your chosen network.
- What is the difference between ERC-20 and ERC-721?
- ERC-20 is for fungible tokens where every unit is identical and divisible. Use it for currencies, governance tokens, reward points, and stablecoins. ERC-721 is for NFTs where each token has a unique identifier and metadata. Use it for art, identity, in game items, and proof of ownership. ERC-1155 handles batches of both fungible and non fungible together in one contract but is not generated by this tool.
- Is the generated ERC-20 contract audited?
- The OpenZeppelin Contracts library is audited and widely used in production across thousands of contracts. The generated wrapper around it is straightforward inheritance plus a few standard functions. Even so, any code that holds value should be reviewed by a security professional before mainnet deployment, especially if you modify the generated code afterwards or extend it with custom logic.
- What does the ERC-20 token generator produce?
- Solidity source code for an ERC-20 fungible token or ERC-721 NFT contract that imports from OpenZeppelin Contracts 5.x. The code is ready to compile with Solidity 0.8.24 and deploy via Remix, Foundry, or Hardhat. You pick the features such as mintable, burnable, pausable, capped, permit, and enumerable, and the form rebuilds the contract instantly with the right inheritance chain.
- What does mintable mean and should I enable it on my ERC-20?
- Mintable means the contract owner can mint new tokens after deployment. Enable it when supply needs to grow, for example community rewards, staking emissions, or ongoing sales. Disable it when the supply is fixed and immutable. Mintable plus capped is a common pattern: supply can grow but not exceed a hard ceiling that you set at deployment.
- What does pausable mean on an OpenZeppelin ERC-20?
- Pausable lets the owner halt transfers, mints, and burns in an emergency. It is useful as a safety valve for early stage tokens and mandatory for some compliance regimes. It is also a centralisation lever that holders may dislike, so disclose pause power explicitly in the token documentation. Many production projects pause behind a multisig or timelock for extra trust.
- What is permit and when is it useful for ERC-20?
- Permit, defined in EIP-2612, lets users sign an off chain approval rather than sending an on chain approve transaction. The relayer or downstream contract submits the signed permit alongside the action that needs approval. This saves a transaction for the user and is commonly required by DeFi integrations such as Uniswap routers and lending protocols.
- How do I deploy the generated ERC-20 contract with Remix?
- Open Remix, create a new Solidity file, paste the generated code, and let Remix resolve the OpenZeppelin imports from npm. Compile with Solidity 0.8.24 and the optimizer enabled. Connect MetaMask to your chosen network, deploy from the Deploy panel, and verify the contract on the block explorer using the same compiler settings so the source is publicly visible.
Related services and reading
From token generation to launch.