Package.json Generator
Guide
Package.json Generator
Create a valid package.json from a structured form instead of memorizing every field. Set the package name, version, license, module system (ESM or CommonJS), Node engine, scripts, and dependencies, and the tool produces a clean, properly ordered manifest you can drop straight into a project.
Unlike a formatter that reshuffles an existing file, this generator builds the manifest from scratch and skips empty fields, so you get a minimal, publishable file that already follows the conventions npm uses for npm init.
How to Use
- Enter the package name, version, and (optional) description and author.
- Pick a license and choose ES Modules or CommonJS for the module system.
- Set the entry file (e.g.
index.js) and an engines.node range like>=18. - Fill in the scripts you actually use (
dev,build,test,start) — leave fields blank to omit them. - Add dependencies and devDependencies as
name@range, one per line or comma-separated. - Choose your indent (2 spaces, 4 spaces, or tab) and copy or download the generated
package.json.
Features
- Form-driven – No need to remember the exact field names or order; common keys are filled in for you.
- ESM or CommonJS – Toggle the module system and the tool sets
"type": "module"and themoduleentry accordingly. - Smart scripts – Empty script fields are dropped instead of left as
""placeholders. - Dependency parsing – Paste a list of
package@^1.2.3entries and they become a tidydependenciesobject. - Repository helpers – Drop in a GitHub URL and the generator fills
repository,bugs, andhomepagefor you. - Private flag – One click marks the package as private to prevent an accidental
npm publish. - Indent your way – Output as 2 spaces, 4 spaces, or tab to match your repo’s existing style.
- Copy or download – Grab the result as text or download
package.jsondirectly.
FAQ
-
What is the difference between dependencies and devDependencies?
dependenciesare packages your code imports at runtime and that consumers of your package will also install.devDependenciesare tools you only need while developing or building the project — bundlers, test runners, type checkers — and they are not installed when someone adds your package to their own project. -
What does setting type to module actually do?
Setting
"type": "module"tells Node.js to treat.jsfiles in the package as ES modules, soimportandexportwork natively. Without it, Node treats.jsas CommonJS and you have to userequire/module.exports. ES Modules also enable top-levelawaitand stricter file resolution. -
Why does package.json use semantic versioning?
Semantic versioning (MAJOR.MINOR.PATCH) gives consumers a contract: a PATCH bump should be a safe bug fix, MINOR adds backward-compatible features, and MAJOR signals breaking changes. Range operators like
^and~rely on this contract so npm can install compatible updates without breaking your build. -
What is the engines field for?
The
enginesfield declares which Node.js (or other runtime) versions your package supports. npm and many tools surface a warning when an installer is on an unsupported version, and some platforms refuse to install at all. Setting an explicitnoderange prevents subtle bugs caused by APIs that exist on newer Node versions.
Install Our Extensions
Add IO tools to your favorite browser for instant access and faster searching
恵 Scoreboard Has Arrived!
Scoreboard is a fun way to keep track of your games, all data is stored in your browser. More features are coming soon!
Must-Try Tools
View All New Arrivals
View AllUpdate: Our latest tool was added on May 3, 2026
