Tiny Online Tools logoTiny Online Toolssearch搜索工具…grid_view全部工具
首页chevron_right安全工具chevron_rightNanoID 生成器NanoID 生成器

NanoID 生成器

生成具有可自定义字母表和大小的紧凑、URL 安全的唯一 ID。

每个生成 ID 的字符长度(4–64)。每次生成 1–100 个 ID。info碰撞概率: Astronomically low在字母表长度为 64、尺寸为 21 时。

相似工具

短 ID 生成器

短 ID 生成器

为 URL、引用和内部工具生成简短的唯一 ID。

会话 ID 生成器

会话 ID 生成器

生成具有不同字母表和长度的随机会话标识符。

Bcrypt 生成器

Bcrypt 生成器

生成 bcrypt 密码哈希值。

MD5 生成器

MD5 生成器

快速生成 MD5 哈希值。

子网计算器

子网计算器

计算任意 IPv4 子网的网络地址、广播地址、子网掩码、通配掩码和可用主机范围。

邮箱反混淆器

邮箱反混淆器

将混淆的邮箱解码还原为纯文本。支持 HTML 实体、Base64、ROT13、[at]/[dot]、反转文本等。

Markdown 预览器

Markdown 预览器

通过渲染后的 HTML 面板实时预览 Markdown。

apps

更多工具

浏览我们完整的免费在线工具集合。

NanoID Generator

NanoID is a lightweight alternative to UUID that 生成s tiny, URL-safe unique identifiers. Where a UUID takes 36 characters, a NanoID can be as short as 21 characters (or even shorter if you prefer). This tool 生成s NanoIDs with a customizable alphabet and size, making it perfect for applications where ID length matters but security and uniqueness are critical.

Compact by design

NanoID uses a larger alphabet than UUID v4 (62 characters instead of 16), allowing the same uniqueness in fewer characters. A default-sized NanoID is only 21 characters, making it ideal for short links, API route parameters, file identifiers, or anywhere space is at a premium. Unlike shortening a UUID (which is still 128 bits of in格式化ion), NanoID is natively compact.

URL-safe by default

The default NanoID alphabet is URL-safe—it contains only characters that don't need percent-encoding in URLs. This means you can embed NanoIDs directly in URLs without encoding concerns. No special handling required. Custom alphabets let you use different character sets when needed (all lowercase for case-insensitive systems, numeric-only for certain legacy systems, etc.).

Customizable alphabet and size

Choose from presets or define your own alphabet. Smaller alphabets produce longer IDs for equivalent security (more characters needed to reach the same entropy), while larger alphabets allow shorter IDs. Adjust the size from 4 to 64 characters based on your collision tolerance and space constraints.

Collision probability

The tool calculates collision probability based on your chosen alphabet and size, answering the question: "How many IDs can I 生成 before there's a 50% chance of collision?" This helps you make informed decisions about size. For most applications, the default size provides enormous collision tolerance.

Growing adoption

While UUIDs are more ubiquitous, NanoID is gaining adoption in modern web applications because of its compactness and URL-friendliness. Many frameworks and libraries now offer NanoID support as a standard ID generation option.