Free, OpenZeppelin based generator

ERC-20 / ERC-721 Token Generator

Generate Solidity contracts for fungible tokens or NFTs with the features you actually need. Toggle mintable, burnable, pausable, capped, permit, or enumerable and the generated code rebuilds in real time.

No loginOpenZeppelin 5.xSolidity 0.8.24
Token contract generation flowFeature toggles compose into a generated Solidity contract that compiles into deployable bytecode.featuresmintable burnablepausable cappedpermit enumerableOpenZeppelin5.xSoliditycontract MyTokenis ERC20, ...

Generated Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MyToken is ERC20, Ownable {
    constructor()
        ERC20("MyToken", "MTK")
        Ownable(msg.sender)
    {
        _mint(msg.sender, 1000000 * 10 ** decimals());
    }

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }
}
Deploying with Remix
  1. Open remix.ethereum.org.
  2. Create a new file named after the contract (for example, MyToken.sol).
  3. Paste the generated code.
  4. In the Solidity compiler tab pick 0.8.24 and compile.
  5. Switch to Deploy & Run, choose Injected Provider for your wallet, and click Deploy.
  6. Verify the deployed address on the chain explorer.

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 review

Frequently asked questions

What does this 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 (mintable, burnable, pausable, capped, permit, enumerable) and the form rebuilds the contract instantly.
Is the generated contract audited?
The OpenZeppelin Contracts library is audited and widely used in production. 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.
Which ERC standard should I pick?
ERC-20 is for fungible tokens: every unit is identical and divisible. Use it for currencies, governance tokens, reward points, and stablecoins. ERC-721 is for NFTs: each token has a unique identifier and metadata. Use it for art, identity, in game items, and proof of ownership. ERC-1155 (not in this generator) handles batches of fungible plus non fungible together.
What does mintable mean and should I enable it?
Mintable means the contract owner can mint new tokens after deployment. Enable it when supply needs to grow (community rewards, staking emissions, 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.
What does pausable mean?
Pausable lets the owner halt transfers, mints, and burns in an emergency. Useful as a safety valve for early stage tokens, mandatory for some compliance regimes, but a centralisation lever that holders may dislike. Decide based on your trust model and disclose pause power explicitly in the token disclosure.
What is permit and when is it useful?
Permit (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.
Where do I get the OpenZeppelin imports from?
When you compile with Foundry or Hardhat, install with npm install @openzeppelin/contracts or forge install OpenZeppelin/openzeppelin-contracts. Remix resolves the imports automatically from npm. Always lock the OpenZeppelin version in your repo so nothing changes between local and CI builds.

Related services and reading

From token generation to launch.

Author: Mudassir Khan. Last updated May 9, 2026. Templates verified against OpenZeppelin Contracts 5.x.