security_api_key_generator
Generate cryptographically random API keys, bearer tokens, and signing secrets in nine formats with optional prefixes, separators, bulk generation, and built-in presets (Stripe, GitHub, OpenAI, Slack, etc.).
Instructions
Generate Random API Keys, Bearer Tokens and Signing Secrets. Generate cryptographically-random API keys, bearer tokens and signing secrets in nine formats (hex, base64, base64url, alphanumeric, alphanumeric-upper, alphanumeric-lower, urlsafe, uuid-v4, bearer) with an optional prefix and separator, plus a bulk mode and a set of issuer-shaped presets (Stripe, GitHub PAT, OpenAI, Slack, AWS, webhook secret). Randomness comes only from a CSPRNG (browser or Node WebCrypto), never Math.random. Use crypto_password_generator instead for human-typeable passwords, passphrases or PINs; use this tool for machine-to-machine secrets. Read-only, non-destructive, stores nothing, contacts no external service, and is rate-limited (20 requests/minute for anonymous callers). Each call returns fresh random keys, so results are never reproducible across calls. Returns the formatted key plus its alphabet, byte count and estimated bits of entropy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Action to run: generate yields one key; generateMany yields up to count keys; presets lists the curated issuer-shaped presets (needs no other field). | |
| format | No | Required for generate and generateMany. Output encoding or shape. bearer is a fixed 256-bit base64url token; uuid-v4 is a 36-char RFC 4122 UUID; both ignore length and byteCount. | |
| length | No | Character count for character-based formats (hex, alphanumeric variants, urlsafe). Ignored by uuid-v4 and bearer. | |
| byteCount | No | Raw random-byte count for byte-based formats (base64, base64url). Takes precedence over length when both are given. | |
| prefix | No | Optional literal text prepended to the key body (for example sk_live_). | |
| separator | No | Optional literal text inserted between prefix and body (only used when both prefix and body are non-empty). | |
| count | No | How many keys to produce for generateMany (each is independently random). Ignored by generate and presets. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Always true on a 200 response. | |
| operation | No | The operation that was run. | |
| result | No | For generate, a single key object (key, alphabet, byteCount, bitsOfEntropy, format, prefix, separator); for generateMany, an array of such objects; for presets, an object with a presets array. |