The quick answer

Every key from this generator is sk_live_ followed by 20 to 64 random characters (letters, digits and a hyphen), drawn from crypto.getRandomValues entirely in your browser. The random body carries roughly 120 bits at the default length and 383 bits at the top of the slider; generate up to 500 per batch, copy the list, and nothing ever uploads.

What an API key actually is

An API key is a bearer secret: a string whose mere possession grants access, which makes its entropy the entire security story. Length is the only real decision here, the randomness comes from crypto.getRandomValues (the browser's audited randomness source, never Math.random), and the computation never leaves your machine. There is no network request to intercept and no log that ever held your key.

Using the tool is one pass: set the count and the length, press Generate, and copy or download the list. Five keys appear on page load, pre-rolled with the default settings (a 20-character body each); every further press of Generate re-rolls the batch. Changing the settings alone does not re-generate, so press the button again after you move the slider.

Generating a key: the walkthrough

  1. Set How many

    The count box accepts 1 to 500, with five keys per click as the default. Each key is drawn independently from the same source, so a batch for dev, staging and production takes one press.

  2. Set the Length

    The slider runs 8 to 64, and the random body of the key is the greater of your setting and 20 characters: the 8-19 range still yields 20-character bodies. At 64 the body is 64 characters, the maximum entropy this tool offers.

  3. Press Generate

    The result panel fills with one key per line. Every character comes from crypto.getRandomValues, the browser's audited randomness source, never Math.random.

  4. Copy or download

    Copy puts the whole list on your clipboard; Download saves it as apikey-output.txt. Grabbing a single key means selecting that line yourself; the buttons work on the full batch.

  5. Close the tab when done

    There is no history and no server copy; the keys exist in the panel, your clipboard and nowhere else.

How a key is built: alphabet, length and entropy

The random body is drawn from a fixed 63-symbol alphabet: all 26 uppercase letters, all 26 lowercase, the 10 digits, and a hyphen. Each character therefore carries log2(63), about 5.98 bits, and the arithmetic is one multiplication, entropy = length times 5.98. One honest footnote: each random byte is mapped onto the 63 symbols with a modulo, and 256 does not divide by 63, so four symbols come up about 23 percent more often than a perfect uniform draw. At 120-plus bits of total entropy, that skew is noise.

Body length (characters)Entropy in the random body
20 (the default)About 120 bits
22About 132 bits, clears the 128-bit line
32About 191 bits
43About 257 bits
64 (the slider maximum)About 383 bits
The slider maps straight to entropy at 5.98 bits per character; the table is the whole menu.

Sixty bits is roughly where offline brute force becomes feasible in days. The smallest key this tool emits, the 20-character default body, already carries about 120 bits, twice that line, and the slider tops out near 383.

Why every key starts with sk_live_

The generator emits keys in the sk_live_ shape made popular by payment-platform live-mode secrets, so every line begins with those eight characters. The prefix contributes zero entropy; it exists so secret scanners can flag a leaked key in a commit and support desks can recognize one in a bug report. If your platform expects a different prefix, paste the key and swap the front: the random body does not care what precedes it.

The prefix also does something the raw body cannot: it marks the string as a credential in logs and bug reports at a glance. A 28-character blob with no marker is indistinguishable from base64 data; sk_live_ in front of it is a confession.

Who generates API keys, and why

Backend developers cut keys for third-party integrations, webhook signing secrets, and per-environment service credentials before a secrets manager exists. Generating locally means a string that will guard production traffic was never transmitted to anyone's server before it reached yours, including this site's.

The same batch habit covers staging and QA: five keys per press means a full environment set (dev, staging, production, two spares) in one click, each independent of the others.

The feature list, in one table

AspectThis tool
Processing100% client-side (JavaScript in your browser)
Signup requiredNever; the tool asks for neither account nor email
Data uploadedNever; keys exist only in your tab
SpeedBatch on Generate; 500 keys in one press
Mobile supportFull; responsive, slider and one button
Offline useWorks after first load, network not needed
CostFree, funded by clearly labelled ads away from the controls
DocumentationMethodology, entropy table and FAQ on this page

What a generated key cannot do for you

  • A random key fixes entropy, not operations: rate limiting, per-key scopes, IP allowlists and expiry still have to be enforced server-side.
  • A key generated here is not registered anywhere; your API must store a hash of it before it authenticates anything.
  • Generation cannot rotate keys for you: schedule rotation, keep overlap windows, and revoke the old key once traffic has drained.

Your keys never touch a server

A generated key is a credential before it is anything else. The generation happens in your tab, so the only copies are the one on screen and whichever you paste somewhere; the browser's network inspector, open while you generate, shows an empty request list.

How this stacks up against the usual alternatives

AlternativeWhere it winsWhere this tool wins
Command line (openssl rand -hex 32)Exact randomness, zero navigationUp to 500 keys per press, no flags to recall, and the entropy table above replaces mental hex math
Provider dashboards (AWS, GitHub, Stripe)Keys their platform issues and revokes for youKeys your own API defines, at the length you choose, with no account attached
Password manager generatorsSecrets humans type from memoryBatch provisioning with a stated alphabet and entropy math, not symbol menus

The big tools sell depth for a setup fee in time; this page sells immediacy and charges nothing, in money or signup.

Best practices, minus the folklore

  • Give every environment its own key: dev, staging and production sharing one secret turns a test-log leak into a production incident.
  • Never commit keys to version control. Put them in environment variables or a secrets manager, and add a secret scanner to CI so a mistake fails the build instead of the company.
  • Drag the slider to 64 for anything signed (HMAC or JWT secrets): a 383-bit body in a string that survives every transport unchanged.
  • Keep a prefix, sk_live_ or your platform's own, so leaks are greppable; the prefix costs nothing and secret scanners key off it.

When something behaves unexpectedly, the causes are almost always one of these:

  • A key that stops working was usually copied with trailing whitespace or a missing character; regenerate rather than eyeball-debugging.
  • A 401 with a fresh key almost always means the server never stored it, or stored it hashed differently than it verifies.
  • A key that must travel in a URL is already safe here: the alphabet has no plus or slash, and the hyphen never percent-encodes.

If the generator misbehaves on your setup, tell the team through the contact page; fixes for verified bugs usually land within days, not months.

Frequently asked questions

These are the questions people actually search about API key generators, answered directly.

How long should an API key be?

128 bits is the practical floor, and 256 bits removes all doubt. This generator's random bodies run 20 to 64 characters at about 5.98 bits each, so 119.5 to 382.5 bits; the default 20-character body sits just under the 128-bit line, and sliding the length past 22 clears it. Below 64 bits an attacker can brute-force the space offline; above 128 bits the length stops being the weak part of your system.

What characters appear in a generated key?

Letters, digits and a hyphen: a fixed 63-symbol alphabet (all 26 uppercase letters, all 26 lowercase, the 10 digits, and -). There is no plus, slash or underscore, so keys survive URLs and HTTP headers without percent-encoding. Hex, base62 and base64url are other common packagings (4, about 5.95, and 6 bits per character); this tool draws from its one 63-symbol set rather than offering a menu of them.

Should an API key have a readable prefix like sk_live_?

Every key from this generator already starts sk_live_, a shape made popular by payment-platform live-mode secrets. The prefix carries zero entropy; it exists so secret scanners can flag a leaked key in a commit and support desks can recognize one in a bug report. If your platform expects a different prefix (gh_, sq_, api_), paste the key and swap the front: the random body does not care.

How should generated keys be stored on the server?

Store a SHA-256 hash of the key plus a short visible prefix for lookup, never the key itself, and compare submitted keys in constant time. Show the full value exactly once, at creation. That is the same pattern GitHub and Stripe use for their tokens.

Is it safe to generate production keys in a browser tool?

Yes, because the generation is local: the key is drawn from crypto.getRandomValues in your tab, no request carries it anywhere, and the page still works with your network disconnected. The caution that remains is anywhere else you paste it; treat the key like a password from the moment it exists.

Can two randomly generated keys ever be identical?

Not at any scale you will experience. With 128 bits of entropy you would need about 2^64 keys, 18 quintillion, before a coin-flip chance of a duplicate, and larger spaces push that beyond astronomical. Collision is the one risk you can safely ignore with keys this size.

What to reach for next

These tools share the key-generation workflow most often.

  • Password Generator: human-typed secrets with strength scoring, where memory and keyboard layout matter more than raw bits.
  • UUID Generator: identifiers rather than secrets; v4 for pure randomness, v7 when database index order matters.
  • Secret Key Generator: the sibling that draws from the full printable-ASCII range when you want every symbol on the keyboard.
  • NanoID Generator: the same 63-symbol alphabet this tool uses, in plain form at any length from 8 to 64.

Sources and further reading

Random keys, honest arithmetic, zero uploads; the closing habit that matters is rotation, and a fresh 120-bit key costs one click. The sources below are where the conventions and the threat model come from.

Sources and further reading

We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.