API Key Generator
Prefixed keys at fixed lengths, each with its entropy in bits.
Prefixes and entropy
A good API key is a long random string, often with a short prefix that signals where it belongs, for example sk_live_ or pk_test_. The prefix is not secret and adds no entropy; it just helps humans and tooling recognise and route the key. All of the security comes from the random portion.
The table below shows the entropy for each length using the default Base62 alphabet (62 characters). Even the shortest option here carries far more randomness than a typical password.
| Length | Entropy | Rating |
|---|---|---|
| 16 chars | 95 bits | Strong |
| 24 chars | 143 bits | Excellent |
| 32 chars | 191 bits | Excellent |
| 48 chars | 286 bits | Excellent |
| 64 chars | 381 bits | Excellent |