Package.json Generator
Generate package.json files visually with form fields, validation, template presets, and live JSON preview.
About This Tool
The Package.json Generator is a free browser-based tool that helps
developers create package.json files through a visual
form instead of editing raw JSON by hand. Whether you are
bootstrapping a new npm package, setting up a monorepo, or
converting an existing project, this tool generates a correctly
structured manifest in seconds.
The package.json file is the heart of every Node.js
project. It tells npm (or yarn, pnpm) which dependencies to
install, which scripts to run, where to find entry points, and what
metadata to publish to the registry. Getting the structure right
from the start avoids headaches down the road, especially for
fields like exports, engines, and
files that have specific formatting requirements.
All processing happens entirely in your browser. No data is sent to any server, making this tool safe for any project. The form validates package names against npm's naming rules (lowercase, no spaces, scoped names supported) and checks version numbers for valid semver format in real time.
Five template presets are included to help you get started quickly: Node.js CLI, React App, Express API, TypeScript Library, and Monorepo Root. Each preset populates common scripts, dependencies, and configuration fields appropriate for that project type. You can customize every field after applying a preset.
How to Use
- Optionally select a template preset (Node.js CLI, React App, Express API, TypeScript Library, or Monorepo Root) to populate common fields.
- Fill in basic information: package name (required), version (required, semver), description, author, license, and whether the package is private.
- Expand the Entry Points section to set
main,module,types, andexportsfields. - Add scripts using the quick-add preset buttons (start, dev, build, test, lint) or create custom key-value pairs.
- Add dependencies, devDependencies, and peerDependencies with package names and version ranges.
- Expand Advanced to configure repository, bugs, homepage, engine constraints, and the files array.
- Review the live JSON preview on the right, then Copy or Download the file. Use Ctrl+Shift+C to copy with a keyboard shortcut.
FAQ
What is a package.json file?
A package.json file is the manifest of a Node.js project. It describes the project's name, version, dependencies, scripts, entry points, and other metadata. npm, yarn, and pnpm all use this file to install dependencies and run scripts.
Is my data safe with this tool?
Yes. The entire tool runs client-side in your browser. No data is sent to any server. Your package configuration never leaves your machine.
Related Tools
JSON Formatter
Format, validate, and beautify JSON with syntax highlighting and tree view.
.gitignore Generator
Generate .gitignore files by selecting languages, frameworks, and IDEs. Combine multiple templates instantly.
Robots.txt Generator
Generate robots.txt files with a visual editor for user-agents, allow/disallow rules, and sitemap entries.
Meta Tag Generator
Generate HTML meta tags, Open Graph, and Twitter Card tags with live SNS preview.
Code of Conduct Generator
Generate CODE_OF_CONDUCT.md files from Contributor Covenant, Citizen, Django, or custom templates with customizable sections.
Package.json Diff
Compare two package.json files side by side. Detect added, removed, and changed dependencies with version bump detection.
Semver Calculator
Check semver range matches, compare versions, calculate increments, and batch-test version lists with semantic versioning rules.
License Identifier
Identify open source licenses from pasted text, compare permissions and conditions, and generate license files with your details.