{"schemaVersion":1,"id":"nano-id","name":"Nano ID","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/nano-id/","officialUrl":"https://github.com/ai/nanoid","isCatalog":false,"description":"A compact unique identifier generator: it creates IDs for application records and elements with configurable alphabets and lengths.","tasks":["Create compact application record IDs","Connect ID generation to record creation and test value persistence and retrieval"],"categoryIds":["backend"],"subcategoryIds":["backend.api"],"tags":["Nano ID","API","Development"],"aliases":["ai/nanoid","nanoid","nano-id"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Create compact application record IDs","chooseWhen":["Create compact application record IDs","Connect ID generation to record creation and test value persistence and retrieval"],"considerInstead":[],"requirements":["For React Native, the documentation requires a random values polyfill before importing Nano ID."],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: MIT for the code; dependencies have separate licenses.","The non-secure variant has a different randomness model. A customAlphabet alphabet must contain 1 to 256 characters; the same seed does not guarantee the same sequence across versions."],"faq":[{"question":"What can you use for free in Nano ID?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with Nano ID?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for Nano ID?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with Nano ID?","answer":"Define the identifier format, permitted alphabet, and length. Connect ID generation to record creation and test value persistence and retrieval. Add error handling and an integration check of the result."},{"question":"How can I choose Nano ID length and use identifiers in React?","answer":"Standard Nano ID uses crypto/Web Crypto and a URL-friendly alphabet with a length of 21 characters. customAlphabet changes alphabet and length, but shortening IDs increases collision probability. In React, a list item's identifier must persist between renders; a fresh nanoid() directly in key on every render does not satisfy that."}],"related":[],"sources":["https://github.com/ai/nanoid","https://raw.githubusercontent.com/ai/nanoid/HEAD/README.md","https://raw.githubusercontent.com/ai/nanoid/HEAD/LICENSE","https://www.open-source-tools.com/","https://raw.githubusercontent.com/ai/nanoid/main/README.md"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Create compact application record IDs.","inputs":["A data contract or HTTP workflow.","A project with a supported runtime."],"steps":["Define the identifier format, permitted alphabet, and length.","Connect ID generation to record creation and test value persistence and retrieval.","Add error handling and an integration check of the result."],"checks":["Invalid and missing data are handled predictably.","Types and the actual response agree; errors are not hidden."]},"sources":["https://github.com/ai/nanoid","https://raw.githubusercontent.com/ai/nanoid/HEAD/README.md","https://raw.githubusercontent.com/ai/nanoid/HEAD/LICENSE","https://www.open-source-tools.com/","https://raw.githubusercontent.com/ai/nanoid/main/README.md"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"Backend / API library","kind":"library","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/ai/nanoid","label":"Official source"},{"url":"https://raw.githubusercontent.com/ai/nanoid/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/ai/nanoid/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"},{"url":"https://raw.githubusercontent.com/ai/nanoid/main/README.md","label":"Official source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}