Security ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Security Tools

Secure API Key Generator

Generate random API keys locally with a custom prefix, length and alphanumeric, URL-safe, hex, Base58 or Base32 characters, plus SHA-256 hashes to store.

View all tools
Result

Press “Generate API keys” to see the result.

How to use Secure API Key Generator

Enter a prefix such as sk_live and choose its separator, then set the random length, character set and number of keys. Press Generate API keys, and tick the hash option if you want SHA-256 values to store in your database.

  1. Set a prefixAdd a prefix such as sk_test or pk_live to label the environment, or leave it blank.
  2. Choose length and charactersUse 32 or more random characters and pick the character set the receiving system accepts.
  3. Generate and store safelyCopy the keys into a secret manager; tick the hash option to get SHA-256 values for storage.

Prefix for people, randomness for security

A prefix tells you what a key is for and helps secret-scanning tools find leaked keys, but the security comes entirely from the random part. Each character is drawn evenly with the browser's cryptographic generator: the default 32 alphanumeric characters give about 191 bits of entropy, 32 URL-safe characters 192 bits and 32 hex characters 128 bits. The tool warns below 128 bits. Never put user IDs, timestamps or other guessable data in the secret part.

Store only a hash on the server

Treat API keys like passwords: a database leak should not reveal them. With Also show SHA-256 hashes ticked, the result table lists each key with its hash. Give the full key to the client, store only the hash, and when a request arrives, hash the key it presents and compare. Because the keys are long and random, a single SHA-256 is enough; a slow password hash is not needed.

Accuracy and data handling

A format or strength result covers only the checks shown here and does not replace a full security review or secure key management. The calculation runs in your current browser; the tool code does not send the input to a processing API.

Often Used Together

Next step

FAQ

How are the keys generated?

With your browser's cryptographic random generator, choosing each character evenly from the selected set so no character is more likely than another.

What length should I use?

Aim for at least 128 bits of entropy: 22 or more alphanumeric or URL-safe characters, or 32 hex characters. The default 32 alphanumeric characters give about 191 bits.

Are the keys sent to a server?

No. Keys and hashes are created in this browser tab. Store copied keys in a secret manager or environment variables, never in a code repository.

Which character set should I pick?

Alphanumeric is the most widely accepted and selects with a double-click; URL-safe Base64 packs the most entropy; Base58 avoids look-alike characters; Base32 suits case-insensitive systems.

More Security Tools

Related tools