This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
A tiny, secure, URL-friendly, uniquestring IDgenerator forJavaScript.
> “An amazing level of senseless perfectionism,
> which is simply impossible not to respect.”
* **Small.** 118 bytes (minified and brotlied). Nodependencies.
[Size Limit] controls the size.
* **Safe.** It uses hardware random generator. Can be used in clusters.
* **Short IDs.** It uses alarger alphabet than UUID (`A-Za-z0-9_-`).
So ID size was reduced from36to21symbols.
* **Portable.** Nano ID was ported
to over [20 programming languages](./README.md#other-programming-languages).
```js
import{nanoid}from'nanoid'
model.id=nanoid()//=> "V1StGXR8_Z5jdHi6B-myT"
```
---
<imgsrc="https://cdn.evilmartians.com/badges/logo-no-label.svg"alt=""width="22"height="16"/>Made at <b><ahref="https://evilmartians.com/devtools?utm_source=nanoid&utm_campaign=devtools-button&utm_medium=github">Evil Martians</a></b>, product consulting for <b>developer tools</b>.