API Key
Generate a random lowercase-hex token for API keys, secrets and one-time links. Choose how many hex characters you want (8–128); each character is drawn from fresh bytes supplied by your browser's cryptographic random source, so strength grows with length — 4 bits per character — and the tool prints the figure alongside the key. The worked example shown on this page is generated from a fixed seed at build time and is labelled as an example: it is not safe to use. Generate your own in the browser.
Try it now
Worked example
Inputs
- Hex chars
40
Frequently asked
How long should an API key be?
32 hex characters is 128 bits, which is a common and strong length. The tool prints the bit figure for whatever length you pick, so use that rather than a rule of thumb — it is simply 4 bits per hex character.
Is it only hex?
Yes — the output is lowercase 0–9 a–f, which is safe to paste into URLs, headers and config files.