unstale

npm / nanoid

nanoid

What changed in nanoid 3 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

1 breaking3 security1 new APIs and options6 performance10 fixes and other

nanoid 66 changes

Breaking changes 1

Performance 4

  • The JavaScript bundle size was reduced, which can benefit applications that bundle nanoid.

    6.0.2release notes

  • Improved customRandom performance when changing the requested size.

    6.0.2release notes

  • customAlphabet generation is 4 times faster.

    6.0.0release notes

  • nanoid generation is 4 times faster.

    6.0.0release notes

Fixes and other changes 1

  • Fixed handling of floating-point size values passed to customRandom.

    6.0.2release notes

nanoid 510 changes

Security 2

New APIs and options 1

  • The CLI now supports --version for displaying the installed nanoid version.

    5.1.7release notes

Performance 1

  • Made cusatomAlphabet 75% faster, improving performance for developers using it.

    5.1.8release notes

Fixes and other changes 6

  • Fixed random pool corruption on big ID sizes, improving ID generation reliability.

    3.3.14, 5.1.15release notesrelease notes

  • Fixed a regression that increased the size of the npm package.

    5.1.14release notes

  • Fixed a breaking issue when requesting a big ID.

    3.3.12, 5.1.11release notesrelease notes

  • Fixed nanoid breaking when requesting a big ID.

    5.1.10release notes

  • Type definitions for customRandom were fixed, improving type-checking for users of that API.

    5.1.7release notes

  • The nanoid.js distribution file was updated for CDN use.

    5.1.7release notes

nanoid 35 changes

Security 1

  • nanoid: custom generators can loop indefinitely when size is zero

    3.3.18security advisory

Performance 1

  • Reduced npm package size, which may decrease installation and distribution overhead.

    3.3.13release notes

Fixes and other changes 3

  • Fixed types for developers using nanoid.

    3.3.20release notes

  • Fixed an issue where setting a huge user ID could kill the app.

    3.3.19release notes

  • Fixed an infinite loop when the requested size is zero.

    3.3.17release notes