gg
HomeGenerators › API Key
Generators

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

466890afd8371ecd4569ee274e514ac4e2ecfb81 Strength: 160 bits — 40 hex characters. ⚠ EXAMPLE ONLY — NOT SAFE TO USE. This was produced from a fixed seed so the page has something to show. Open the tool in a browser and generate a real one.

Inputs

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.

Related Generators tools