A free, visual form-based tool to generate complete, valid package.json files with every common field — name, version, scripts, license, author, exports, engines, and more. No login required.

Package.json Generator is a free browser-based tool that lets you fill in a structured form and instantly get a complete, valid package.json. No memorising field syntax. No hunting for the right format for author or exports. Fill in what you know, skip what you don't, and copy or download the result.
→ package-json-generator.tools.jagodana.com
Every JavaScript project starts with a package.json. Most developers know name, version, and scripts. But the full spec is wide:
author field — a string or an object?main, module, exports, or all three?"type": "module" actually affect?engines to target Node 18+?license identifier for Apache?Getting these right matters for library authors publishing to npm, for teams standardising project configurations, and for developers onboarding onto a new stack. But the npm documentation is scattered, and npm init only covers the basics.
The result: most package.json files are half-filled, missing fields that tooling, bundlers, and package managers actually read.
Fill in the fundamentals: name (auto-slugified to a valid npm format), version, description, and keywords. Toggle the private flag to mark packages that shouldn't be published.
Enter author name, email, and URL — the tool formats the composite author string correctly. Select a license from the picker: MIT, ISC, Apache-2.0, GPL-3.0, AGPL-3.0, BSD-2-Clause, BSD-3-Clause, MPL-2.0, UNLICENSED, or a custom value.
Add homepage, repository (formatted as { type: "git", url: "..." }), and bugs.url — the fields most library authors forget until their first npm publish.
Configure main (CJS), module (ESM bundler hint), and types (TypeScript declarations). Optionally include the modern exports field with mapped CJS and ESM paths. Select "type": "module" or "commonjs" — or omit it entirely.
Toggle common npm scripts on/off with a single click: dev, build, start, test, lint, lint:fix, type-check, format, clean, prepare. Add unlimited custom scripts with name and command fields.
Set runtime version constraints (e.g. node >=18.0.0) without remembering the exact field format.
The generated package.json updates in real time in the right panel. Copy to clipboard or download as a file with one click.
exports with CJS + ESM mappingpackage.json file downloadThe tool maintains a FormState object across all form sections. A buildPackageJson() function reads that state and constructs the output object — omitting any empty fields — then serialises it with JSON.stringify(output, null, 2).
The author field is assembled from three separate inputs into the npm "Name <email> (url)" format. The exports field maps "." → { import: "...", require: "..." } when enabled. Script presets are toggled via a Record<string, boolean> map that merges with any custom scripts at output time.
The right panel renders the live JSON in a monospace pre block with sticky positioning so it stays visible while scrolling the form.
The most direct use case. You have an idea for a library, you need a package.json before you write a line of code. This tool gives you a complete starting point in under two minutes — including fields (exports, engines, types) that npm init doesn't ask for.
Teams with multiple packages often drift into inconsistent package.json patterns. Use the generator as a template baseline: configure once, download, drop into each new package, and adjust only what changes.
The form surface area is a reference. Which fields exist, what they do, and how they interrelate. For developers newer to Node.js packaging, filling out the form and reading the live output is faster than navigating the npm documentation.
Before publishing to npm, library authors can use the generator to confirm they've set main, module, types, exports, engines, license, and repository correctly. The live output makes it easy to spot missing or malformed fields before npm publish.
Migrating a package from CJS to ESM requires adding "type": "module", updating exports, and often setting main and module separately for dual-mode packages. The generator's entry-point section makes the right combination of fields obvious.
npm initnpm init asks for seven fields; this tool covers everythingnpm init doesn't touch the modern exports fieldauthor string format, repository object shape, engines key formatscripts and devDependenciesPackage.json Generator removes the friction from starting a JavaScript package:
npm init missesTry it now: package-json-generator.tools.jagodana.com
The client needed a robust developer tools solution that could scale with their growing user base while maintaining a seamless user experience across all devices.
We built a modern application using Node.js and npm, focusing on performance, accessibility, and a delightful user experience.
Category
Developer Tools
Technologies
Date
June 2026
More work in Developer Tools