M

    wtf is the default nanoid length

    The default nanoid length is 21 characters.

    This gives you about 126 bits of entropy, which provides excellent collision resistance - you'd need to generate around 2.8 trillion IDs to have a 1% chance of collision.

    If you need shorter IDs, you can specify a custom length like nanoid(10), but 21 is the default when you just call nanoid() without arguments.


    Chat controls

    Sonnet 4

    Smart, efficient model for everyday use Learn more

    Content

    No content added yet
    Add images, PDFs, docs, spreadsheets, and more to summarize, analyze, and query content with Claude.