Skip to content
M2TOOLKIT

Developer · free tool

package.json Generator

Start a new Node.js project with a correct package.json.

Use it as often as you like — it's free, with no sign-up and no limits.

  • Developer
  • Free
  • No sign-up
  • Runs in your browser
  • Updated
Module type
Scripts

Dependencies without a version are written as “latest” — run npm install to pin real versions.

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the package.json Generator

  1. Enter the name, version and description — the name is checked against npm's rules.
  2. Add scripts and dependencies.
  3. 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.

Other tools people use alongside the package.json generator.