Generate API key

Generate a random bearer token in a URL-safe or compact encoding.

freeworks offlinenothing uploaded
ToolAPI Key Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Bytes from a cryptographically secure random source are encoded with the selected alphabet, such as hexadecimal or Base64url. The output is an opaque bearer secret; length and alphabet determine its brute-force search space.

  • URL-safe alphabets avoid escaping in headers and token storage.

Worked example

Stripe-style API Key
Generate a Base62 API key with a prefix like Stripe
Input
											Prefix: sk_test_
Length: 32
Format: base62
Count: 1
										
Output
												sk_test_aR9GarGc4gbOgueUMvHvXXx28g7qvzot
											

When to use this

Integration credentials, CI deployment secrets, and token rotation workflows generate bearer keys.

Edge cases

  • A token generated with a predictable timestamp is guessable.
  • Base64url and standard Base64 use different alphabets and padding.
  • Putting a bearer key in a URL can leak it through logs and referrers.

References