Valid names for your next package
npm publish will reject a name that breaks the registry’s rules, which is an annoying way to discover a typo. The npm Package Name Generator produces names that already satisfy every constraint — lowercase, URL-safe, within the length limit — in both unscoped and scoped forms, so you can drop one straight into your package.json.
How it works
npm’s validation requires a name that is lowercase, 214 characters or fewer, URL-safe, not starting with a dot or underscore, and free of spaces and the forbidden characters ~)(*!'. The generator assembles words from curated lists, joins them with hyphens, lowercases everything, and strips any character outside the safe set. For a scoped package it prefixes a @scope/ segment, where the scope itself follows the same character rules.
Each candidate is then checked against the registry’s published validation logic — leading character, allowed characters, and length — before being shown, so every result would pass npm publish’s name check. Availability is a separate question the tool can’t answer, since the unscoped namespace is global.
Tips and example
- Unscoped:
color-utils,parse-config,tiny-router. - Scoped:
@acme/color-utils— useful when the unscoped name is taken or you want to group org packages. - Prefer short, descriptive names; they’re easier to remember and search for on npmjs.com.
- Always confirm availability with
npm view <name>before publishing — a valid name is not a free name. - All names are synthetic suggestions; verify trademark and availability before real use.