Generate random secret keys, encryption keys, API tokens and database passwords, one at a time or as a .env block, with the Web Crypto API in your browser.
This tool makes random secrets for application config: secret keys, encryption keys and salts, database and cache passwords, and API tokens. Every value comes from crypto.getRandomValues, the browser's cryptographic random source, and characters are picked with rejection sampling so each one is equally likely. Values exist only on the page: they are not sent anywhere, not saved in storage or the address bar, and a new set is made each time the page loads. The Clear button removes them from the page.
Pick a format: a URL-safe base64url token (the default), hex, standard Base64, letters and digits only, a DB/URL-safe password for connection strings, or a password with symbols. Set the strength in bytes of randomness (16 to 64) or as a length in characters, and the tool shows the resulting length and entropy in bits. Bulk mode turns a list of key names into a .env block with a separate fresh value for every key, ready to copy as a whole or line by line.
A hash of a phrase you typed is not a secret: it is only as hard to guess as the phrase. Use a value from a random source instead, give each environment (development, staging, production) its own, and never reuse one across apps.
No. Values are generated with the Web Crypto API on your device and kept only in the page's memory. Nothing is written to cookies, local storage or the URL, and the clipboard is used only when you click a Copy button.
32 bytes (256 bits) is plenty for encryption keys and signing secrets. The default of 48 bytes gives extra margin for long-lived app secrets. 16 bytes (128 bits) is the practical minimum.
Database connection strings are URLs, so characters such as @ : / ? # % in a password end or split parts of the URL. Letters and digits never need encoding, so the password works as-is; use a longer one to make up for the smaller character set.
Values with symbols are wrapped in single quotes, because an unquoted # starts a comment and $ can expand a variable in many .env loaders and shells.
Better not. Separate values mean a leak in one environment does not expose the other, and you can rotate one without touching the rest.