Nano ID generator
Generate short, URL-safe random IDs of any length, optionally from your own alphabet.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/nanoid \
-H 'Content-Type: application/json' \
-d '{"input":{}}'
import json, urllib.request
body = {'input': {}}
request = urllib.request.Request("https://setget.net/v1/tools/nanoid", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/nanoid", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "nanoid",
"input": {}
}
{
"input": {}
}
Endpoint: POST /v1/tools/nanoid. Over MCP: run_tool with slug: "nanoid".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
size |
integer | no | Characters per ID. Default: 21. From 1 to 256. |
count |
integer | no | How many to generate. Default: 1. From 1 to 100. |
alphabet |
string | no | Characters to draw from, each listed once. Left out, A-Z, a-z, 0-9, "_" and "-" are used. |
Examples
One standard 21-character ID
Input
{}Result
Different every time. Press the example button above to see one.
Five short hex IDs
Input
{
"size": 10,
"count": 5,
"alphabet": "0123456789abcdef"
}Result
Different every time. Press the example button above to see one.
Questions
- How likely is a collision?
- With the default 21 characters there are 126 random bits, about the same as a random UUID. Shorter IDs or smaller alphabets collide sooner; "entropy_bits" in the result shows the strength.
- Is the output evenly random?
- Yes. Each character is drawn from the operating system's secure random source without modulo bias.
Related tools
- UUID generatorGenerate UUIDs: random (v4), time-ordered (v7), name-based (v5) or the nil UUID.
uuid - ULID generator and decoderGenerate ULIDs, sortable 26-character IDs, or decode one to read its creation time.
ulid - Password generatorGenerate strong random passwords with the character types you choose, and see their entropy.
password-generate - Random generatorMake secure random integers, decimals, bytes and dice rolls, or pick from and shuffle a list.
random - All hashes at onceCompute every supported hash of one input at once: MD5, SHA-1, SHA-2, SHA3-256 and BLAKE2b.
hash-all - Base32 encoder and decoderEncode text to Base32 (RFC 4648) or decode it back, with or without padding.
base32