Skip to main content
Software Version / Package Tools

Package Name Validator

Check a proposed npm or Composer (Packagist) package name against each registry's naming rules before you publish.

Choose npm or Composer and type a name - every naming rule is checked as you type, with a clear pass or fail for each.

Checking a Python package? Use the Python Package Name Checker for PyPI rules.

A valid name can still be taken - check the registry itself before you publish.

What Is the Package Name Validator?

npm and Composer each reject names that break their rules, but the error often only appears when you try to publish. This tool checks the rules up front: for npm, the same checks as the official validate-npm-package-name rules; for Composer, the vendor/package pattern from the composer.json schema.

When to Use It

  • Naming a new library or CLI before you publish it.
  • Choosing a scope (@org/name) or Packagist vendor name for your organisation.
  • Checking names generated by scripts or templates.

How to Use It

  1. Pick the registry.
  2. Type the name - results update instantly.

Key Rules

  • npm: lowercase, at most 214 characters, URL-safe, no leading . or _, optional @scope/ prefix, and not a Node.js core module name such as http.
  • Composer: lowercase vendor/package, letters and digits separated by single -, _ or . (the package part also allows --).

Understanding the Result

Each rule shows a tick or a cross; warnings flag names that are allowed but likely to cause confusion, like repeating "js" or "php" in the name.

Limitations

Availability is not checked - the registry decides that, and npm also blocks names too similar to existing popular packages. For Python packages use the Python Package Name Checker. After choosing a name, pick its first version with the Semantic Version Generator.

Frequently Asked Questions

Not for new packages. npm requires lowercase names; a few old packages with capitals still exist from before the rule.

A name like @org/package. Scopes group packages under a user or organisation and avoid name clashes with public packages.

No. It checks naming rules only. Use npm view <name> or search packagist.org to see if the name is taken.
Share this tool: