How to use the package.json Generator
- Enter the name, version and description — the name is checked against npm's rules.
- Add scripts and dependencies.
- Download package.json, then run npm install.
What does this tool do?
The generator validates package names (lowercase, URL-safe, optional @scope), sets the module type, adds engines so CI uses the right Node version and includes TypeScript types when you need them. Dependencies without versions are written as latest so npm install pins real versions.
Everything runs in your browser — nothing you paste is uploaded.
Why use it?
- npm name validation.
- ESM or CommonJS.
- Script editor.
Use cases
- Start a new Node, React or TypeScript project.
- Prepare a package for publishing to npm.
- Set the Node version CI should use with engines.
Valid and invalid names
✓ my-tool, @acme/ui-kit, react-smooth-tabs
✗ My-Tool (capitals), my tool (spaces), _private (can't start with _ or .)
Names must be lowercase, URL-safe and at most 214 characters.
Common mistakes
- Choosing a name that's already taken on npm — search before publishing.
- Leaving "type" unset and mixing import and require.
- Putting build tools in dependencies instead of devDependencies.
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Frequently asked questions
module or commonjs?
module lets you use import/export in .js files; commonjs uses require. Most new projects choose module.
What does engines do?
It declares which Node versions your package supports; some tools and hosts use it to pick a version.
Why are versions written as latest?
So npm install resolves and saves real version numbers when you first install.
Content last updated . See how M2Toolkit works.