# Foundry cast wallet vanity vs Vanity-ETH: Terminal or Web Page?

Source: https://www.ethvanity.com/blog/foundry-cast-vs-vanity-eth

Published: 2026-11-29

Updated: 2026-11-29

![Diagram contrasting cast wallet vanity in a terminal with Vanity-ETH in a web page](https://www.ethvanity.com/images/blog/foundry-cast-vs-vanity-eth-ethereum.webp)

cast wallet vanity vs Vanity-ETH. cast: Terminal, regex, contract nonce; Vanity-ETH: Web page, EIP-55 case, keystore; Same result: A standard 0x account and key.

[Full-size diagram (SVG)](https://www.ethvanity.com/images/blog/foundry-cast-vs-vanity-eth-ethereum.svg)

[Diagram download (PNG)](https://www.ethvanity.com/images/blog/foundry-cast-vs-vanity-eth-ethereum.png)

Pick cast wallet vanity if you already use Foundry, want regex or scripted searches, or need the address of a contract a key will deploy. Pick Vanity-ETH if you want a web page, exact EIP-55 case matching and a password-encrypted keystore file. Both are free, open source and produce the same kind of 0x address.

## The two tools at a glance

The core job is identical; the way you run it is not.


|  | cast wallet vanity | Vanity-ETH |
| --- | --- | --- |
| Runs as | Command line (Foundry) | Web page with Web Workers; offline build available |
| Pattern options | --starts-with, --ends-with, hex or regex | Prefix, suffix or both |
| Letter case | Ignored for hex patterns | Optional EIP-55 checksum case |
| Threads | --threads | Adjustable thread count |
| Contract address search | --nonce; cast create2 --starts-with for a salt | No |
| Key output | Private key; --save-path appends JSON | Private key or encrypted keystore |
| License | Open source | MIT |


## Which is safer for creating the key?

Neither interface is safer by itself. What matters is the random number source and the machine the tool runs on. Both projects publish their code, so key generation can be reviewed. The cautionary case is Profanity, which [seeded keys from 32 bits](https://www.ethvanity.com/blog/profanity-vanity-address-vulnerability).

- Run either tool on a computer you trust.
- Save the key before you close the terminal or the page.
- If the key must stay on disk, an encrypted file beats plain text; Vanity-ETH's keystore uses a password you choose.
- Do not reuse a key that appeared in a shared screen, a log or a chat.

## Importing the result

Both give a 64-character hex private key, which MetaMask, Rabby and Trust Wallet import as a standalone account. Vanity-ETH's README says its keystore file also works with MyEtherWallet, MetaMask, Mist and geth.

An imported account is not covered by the wallet's recovery phrase, so back up the key on its own. The [MetaMask import guide](https://www.ethvanity.com/blog/import-vanity-private-key-metamask) lists the checks.


## Vanity contract addresses

Only cast covers this. --nonce finds a key whose contract at a given nonce matches your pattern, and cast create2 searches a salt for a factory deployment. Vanity-ETH searches account addresses only.


## Which one should you use?

For one short prefix or suffix with an estimate before you start, [EthVanity](https://www.ethvanity.com/) is a third option; the [EthVanity vs Vanity-ETH comparison](https://www.ethvanity.com/blog/ethvanity-vs-vanity-eth) covers that pairing.


| You need | Better fit |
| --- | --- |
| A web page, no install | Vanity-ETH |
| Exact checksum case | Vanity-ETH |
| An encrypted keystore file | Vanity-ETH |
| Regex, scripts or JSON output | cast wallet vanity |
| A contract address at a nonce, or a CREATE2 salt | cast |


## Sources

- [Foundry reference for cast wallet vanity](https://www.getfoundry.sh/reference/cast/wallet/vanity)

- [Foundry: cast wallet operations](https://www.getfoundry.sh/cast/wallet-operations)

- [Vanity-ETH source code and README (bokub/vanity-eth)](https://github.com/bokub/vanity-eth)

- [1inch: a vulnerability disclosed in Profanity, an Ethereum vanity address tool](https://1inch.com/blog/post/a-vulnerability-disclosed-in-profanity-an-ethereum-vanity-address-tool)

- [MetaMask Support: how to import an account](https://support.metamask.io/start/how-to-import-an-account/)



Editorial method: https://www.ethvanity.com/about#publication-method
