Secret Key & Password Generator: what it does and how to use it

Secret Key & Password Generator: what it does and how to use it

By Hami Tech·May 21, 2026·Updated June 2, 2026·4 min read

Generate cryptographically random secrets in the format your project actually needs - API-style keys, UUID v4 values, hex strings, base64 strings, or strong passwords - using your browser's crypto.getRandomValues() so nothing is ever sent to a server. Add an optional prefix, generate a batch at once, and copy or download the results as a .txt file.

You should not have to open an IDE to format a snippet from Slack, tidy a JSON blob, or check a hash. Paste it here, copy the result, move on.

Secret Key & Password Generator is a good fit when generating placeholder API keys for local development or demo environments.

The useful part

Secret Key & Password Generator is built around a few practical wins, not a long feature list:

  • Uses the browser's built-in cryptographically secure random number generator, not Math.random().
  • Covers the five secret formats developers reach for most: API keys, UUIDs, hex, base64, and passwords.
  • Optional prefix support makes keys look like real API tokens for seeding test data.
  • Batch generation with one-click copy and a .txt download for seeding env files or test fixtures.

Do this, in order

  1. Pick a format. Choose API Key, UUID v4, Hex, Base64, or Password depending on what you need to generate.
  2. Set length and prefix. Adjust the character length (where applicable) and optionally add a fixed prefix like `sk_live_`.
  3. Choose how many to generate. Generate a single secret or a batch of up to a few hundred at once.
  4. Copy or download. Click any row to copy it instantly, copy the whole batch, or download everything as a .txt file.

Who it is for

  • Generating placeholder API keys for local development or demo environments.
  • Creating UUIDs for database seed data or mock records.
  • Generating hex or base64 secrets for signing keys, encryption tests, or session tokens.
  • Producing a batch of strong passwords for test accounts.

If you want a clean result

  • Never reuse a generated development secret as a real production credential - always issue fresh production keys through your actual provider.
  • Use the prefix field to mimic your real key format (e.g. `sk_test_`) so test data behaves like production data in your code.
  • For encryption or signing keys, prefer Hex or Base64 format at a longer length rather than the API Key format.
  • Download as .txt when seeding multiple environment variables at once to avoid retyping values.

Common mix-ups

  • Using a short length for a value meant to be a real security secret.
  • Assuming UUID v4 values are cryptographically unpredictable enough to double as auth secrets - use Hex or Base64 for that instead.
  • Committing generated secrets to source control, even placeholder ones, out of habit.
  • Forgetting that a prefix counts toward the visible string but not the random portion's length.

Private by default

Secret Key & Password Generator runs in your browser. The file or text you paste stays on your device. There is no account, and nothing is stored on a ToolBox server for this job.

If this is one step in a longer job, these usually come after it:

Before you ask

Are these secrets actually random, or just look random?

They are generated with crypto.getRandomValues(), the Web Crypto API's cryptographically secure random source, the same primitive used to generate real API keys and tokens - not Math.random(), which is not safe for security-sensitive values.

Can I use a generated secret as a real production API key?

You can, since the randomness itself is secure, but most real API keys need to be registered with the service that will authenticate them - generating a random string here doesn't create a working key in some other system, it just gives you a securely random value.

What is the difference between the formats?

API Key and Password use a mixed alphanumeric (plus symbols for Password) charset at a length you choose; UUID v4 is a fixed-format 36-character identifier; Hex and Base64 encode raw random bytes in those two standard encodings, commonly used for signing keys and tokens.

Open the Secret Key & Password Generator when you are ready. It is free, and you do not need an account.