SmartKitio

Random String Generator

Generate a random string for API keys, test data, invite codes, or file names, from an alphabet you control.

Your input stays in your browser. Nothing is uploaded.

About this tool

Each character is picked uniformly from the alphabet using crypto.getRandomValues with rejection sampling, so every character has the same chance. The default alphabet has 62 characters (A–Z, a–z, 0–9); you can type any other set. If a character appears twice in the alphabet, it is twice as likely to be chosen. Length can be 1 to 256 characters.

How to use it

  1. Set the length.
  2. Edit the alphabet if you need, for example, only digits or only lowercase hex.
  3. Press Generate and copy the string.
Entropy (bits) = length × log₂(alphabet size)

Examples

  • API token

    24 characters from the default 62-character alphabet give 24 × log₂(62) ≈ 143 bits.

  • Hex ID

    An alphabet of 0123456789abcdef and length 32 gives a 128-bit hex identifier.

  • Readable invite code

    Use an alphabet without look-alike characters, such as ABCDEFGHJKLMNPQRSTUVWXYZ23456789, for codes people type by hand.

FAQ

How long should a token be?
128 bits or more is a common target for secrets. With the default alphabet that is at least 22 characters.
Is the output stored?
No. It is generated in your browser and disappears when you leave the page.
Can I use emoji or non-Latin characters?
Yes. Each Unicode code point in the alphabet counts as one character.