JSON Escape & Unescape
Turn any text into a JSON string literal, or unwrap one back to plain text.
Generate Nano IDs — shorter than a UUID, and URL-safe by design.
The Nano ID Generator produces URL-safe identifiers with a length and alphabet you choose, and reports the collision probability for those settings — which is the number that decides how short you can safely go.
Nano ID is a 21-character identifier over a 64-character URL-safe alphabet, which gives it about 126 bits of randomness — essentially the same as a UUID v4 in nine fewer characters and with no hyphens to escape.
The length and alphabet are both adjustable, which is the point of the format: a shorter ID for something with few rows, a longer one for something with many. The tool reports the collision probability for whatever you choose, expressed as how many IDs you would have to generate per second, for a year, to reach a one-per-cent chance of a single collision. That is a far more useful number than a bit count when you are deciding how short you can safely go.
How long you could generate at a given rate before a collision becomes likely — far more useful than an entropy figure when choosing a length.
The standard 64-character alphabet passes through URLs, filenames and HTML attributes with no escaping.
Restrict to digits, lowercase or a set you type, for formats with their own constraints.
Drawn from the browser’s secure source with rejection sampling, exactly as the reference implementation does.
Up to a thousand at once, one per line, ready to copy or download.
21 is the default. Shorter is prettier and riskier; the collision figure quantifies it.
The URL-safe default, or restrict it to digits, lowercase or a set you type.
How long you could generate IDs at a given rate before a collision becomes likely.
Produce up to a thousand at once and copy or download them.
A 21-character Nano ID has about 126 bits of randomness against a UUID v4's 122, in 21 characters rather than 36. It is also URL-safe without escaping, which a UUID's hyphens technically are too but look worse.
Yes, and the collision estimate tells you the cost. Ten characters over the default alphabet is fine for a few million rows and reckless for a few billion.
No. They are entirely random and carry no timestamp. If you want ids that sort by creation time, use ULID or UUID v7 instead.
Yes. It uses A to Z, a to z, 0 to 9, hyphen and underscore, all of which pass through URLs, filenames and HTML attributes without escaping.
What people who use the Nano ID Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Nano ID Generator. It takes half a minute and no account.
Write the first reviewTurn any text into a JSON string literal, or unwrap one back to plain text.
Encode and decode Base58 in the Bitcoin, Ripple or Flickr alphabets.
Generate Kotlin data classes with Gson or kotlinx.serialization annotations.
See your own user agent string and what a server can tell from it.
Convert Base64 back to hexadecimal, with your choice of separator.
Draft a GraphQL type definition from a sample JSON response.
Draw an easing curve and see it against the standard ones.
Hash a password with bcrypt, or check one against an existing hash.