Random string generator.
Draw random strings from the characters you choose, or secure tokens as hex, Base64 or Base64url, with their entropy shown. From your browser's cryptographic randomness.
Random string generator.
Need the UI around it? With Pro, your AI agent builds the form, the result card and the rest of the page from a prompt.
Get ProHow it works
3 steps, no account. It runs in your browser and nothing is uploaded.
Choose characters or bytes
Characters for readable codes, bytes for machine secrets.
Set what it is made of
The character sets and length, or the byte count and encoding.
Copy the strings
One or many, with their entropy, to copy or download.
Related tools
More security and dev tools. Every one free, in the browser.
Pricing
Build it with Pro
The tool is free. Pro adds 6,000+ blocks, premium templates and the MCP server, so your AI editor builds the product around it.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
Questions and answers
Before you trust the result: what to know about the format, the limits, your data and the tools next to it.
For an API key, a session id or a reset link: 128 bits is the usual floor, 256 for long-lived secrets. That is 32 hex characters or 22 Base64url characters for 128 bits, twice that for 256.
Characters picks each character from the sets you choose, for codes people read and type. Bytes draws raw random bytes and writes them as hex, Base64 or Base64url, the usual form of a machine secret.
Each character carries log2 of the alphabet size in bits (about 5.95 for 62 letters and digits), times the length. The figure assumes the uniform draw this tool makes; a string a person made up has far less.
crypto.getRandomValues, the browser's cryptographic generator, with rejection sampling so every allowed character is equally likely. Math.random is never used.
Choose characters or bytes, set the sets or the encoding, the length and how many; a new batch is drawn on every change and on Generate. Copy or download the list.
Turn on Leave out look-alikes to drop i, I, l, 1, L, o, 0 and O, for codes read aloud or typed from paper; add your own characters in the extra field.
No. The strings are drawn in your browser and the page makes no request.
No. The Random string generator is free and opens without a sign-in, an account or an install.
Nothing. The Random string generator holds your input in the page's memory, so closing or reloading the tab clears it, and it saves nothing in this browser.
Closest to the Random string generator: Password generator, Nano ID generator, UUID generator, Random number generator. Each opens on its own page, free and in the browser.
The Random string generator is one of 20 in its group. The group's page, /tools/security, lists them all.
The tool is free. Its interface is built from shadcn.io's own components (Button, Input, Slider and the rest of the registry under /ui), which come in React, Vue, Svelte and Solid. Pro adds the blocks and templates for the product around it.
4.9 out of 5 from 150+ developers
Build the product around it
Every block, template and icon, installed by your AI agent in your theme. The tools stay free.
Get Pro




