Skip to content

package.json Generator

Embed

Paste this where you want package.json Generator on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/package-json-generator/" width="100%" height="500" frameborder="0" loading="lazy" title="package.json Generator"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/package-json-generator/">package.json Generator</a> by BrowserUtils</p>

Generate package.json files for Node.js projects.Runs in this tab.

Next step

About package.json Generator

Free online package.json generator. Create package.json files with name, version, description, scripts, dependencies, and other fields for Node.js and npm projects. It runs in your browser. Nothing is sent to a server.

Questions

What is package.json?
package.json is the manifest file for Node.js projects. It contains metadata like the project name and version, lists dependencies, defines scripts for building and testing, and specifies the entry point of your application.
What is the difference between dependencies and devDependencies?
Dependencies are packages required at runtime (e.g., express, react), while devDependencies are only needed during development (e.g., jest, typescript, eslint). DevDependencies are not installed in production builds.
What does the "type": "module" field do in package.json?
Setting "type": "module" tells Node.js to treat .js files as ES modules, enabling import/export syntax instead of require/module.exports. Without it, Node.js defaults to CommonJS.
How do I define custom scripts in package.json?
Add entries to the "scripts" object, e.g., "build": "tsc", "test": "jest". Run them with npm run <name>. The special scripts "start" and "test" can be run directly with npm start and npm test.
Can I generate a package.json for a monorepo workspace?
This tool generates a single package.json. For monorepo workspaces, add a "workspaces" field manually pointing to your package directories (e.g., ["packages/*"]).

More in DevOps & Config

All 16 devops & config