generate_nanoid
Generate compact, URL-safe unique identifiers for URLs, tokens, or database keys. Customizable length and alphabet options ensure collision-resistant IDs.
Instructions
Generate Nano ID strings — compact, URL-safe unique identifiers.
Use this for short unique IDs suitable for URLs, tokens, or database keys.
Nano IDs are URL-friendly, collision-resistant, and customizable.
Parameters:
length — Length of each Nano ID (default: 21).
alphabet — Custom alphabet string (optional). Default uses A-Za-z0-9_-.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| length | No | ||
| alphabet | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |