Generate secrets for your .env
One click for an AUTH_SECRET, a JWT secret, a webhook secret, an API key, a UUID or a strong password, ready to paste into your .env file. Everything is made in your browser and nothing is sent, stored or logged.
Free from Darnly. Spot a bug in the app you're building? Darnly hands it to Claude Code, Codex or Cursor in one key.Add to Chrome
Made in your browser with crypto.getRandomValues. Nothing is sent, stored or logged.
Your .env lines
The prompt names your variables but never their values, so your secrets don’t go into an AI chat. Next: list the names for your team with the .env.example generator, and keep the real file out of git with the .gitignore generator.
More free tools
See all 89 tools- API key leak checkerDid I leak an API key? Check your site’s JavaScript for OpenAI, Stripe, Supabase and other secret keys.
- JWT decoderPaste a token and see when it expires, who it’s for and its role, in plain words. Nothing is uploaded.
- EXIF removerSee if your photos show where you live, then remove the location, date and camera info in one click.
How it works
- Pick what you need: an auth secret, a JWT secret, a webhook secret, an API key, a UUID or a password. A fresh value is ready the moment you click.
- Change the length, encoding or prefix if you want, then copy the value, or copy it as a ready
NAME=valueline for your.envfile. - Need several at once? Tick them under “Your .env lines”, rename them if you like, and copy or download the whole block. Nothing leaves your browser.
Questions
Is it safe to make secrets on a website?
This one, yes. Every value is made in your browser with crypto.getRandomValues, the same random source your operating system uses for keys. Nothing is sent to a server, stored or logged, and the page keeps working with your Wi-Fi turned off. Close the tab and the values are gone.
What should I use for AUTH_SECRET or NEXTAUTH_SECRET?
A random 32-byte value in base64, which is what the “Auth secret” card makes. It is the same as running npx auth secret or openssl rand -base64 32. Auth.js v5 reads AUTH_SECRET, and NextAuth v4 reads NEXTAUTH_SECRET: rename the line in “Your .env lines” to match.
How long should a JWT secret be?
For HS256, at least 32 bytes (256 bits) of real randomness. This tool makes 64 bytes by default, which also covers HS512. Never use a word or a sentence: short secrets can be guessed offline from any token someone has seen.
What is a webhook signing secret?
A shared secret your server uses to check that a webhook really came from the sender, by recomputing an HMAC signature. The whsec_ prefix is the style Stripe, Svix and Clerk use. Change the prefix or clear it to match the service you are setting up.
UUID v4 or v7?
Both are unique IDs, not secrets. v4 is fully random. v7 starts with the time it was made, so new rows sort in order and database indexes stay fast, which makes it the better choice for primary keys. Don’t use either as a password or a token.
Should I paste my secrets into Claude Code, Cursor or Codex?
Better not: whatever you paste into a chat goes to the AI provider. Put the values in .env.local yourself, then use “Copy prompt for your AI agent”, which names your variables without their values and asks the agent to wire them up and keep them out of git.
I committed a secret to git by accident. What now?
Make a new one here, replace the old value everywhere it is used, and turn the old one off. Deleting the file is not enough, because the old value stays in your git history. Then add .env files to your .gitignore with the .gitignore generator.