Skip to main content
Back to Dev generators

Dev

Fake package.json Generator

Used by developers, writers, and creators worldwide.

A fake package.json generator saves developers from hand-crafting dependency lists whenever they need a realistic Node.js manifest fast. Pick from five project types — Express API, React app, Next.js app, CLI tool, or library — and the output includes versioned dependencies, npm scripts, keywords, and metadata that mirror real-world conventions from the npm ecosystem. Toggle dev dependencies on to get a full production-style setup with tools like ESLint, Jest, and TypeScript type packages included. Turn them off when your example only needs runtime deps. Either way, the result is ready to drop into documentation, test fixtures, or workshop starter repos.

Loading usage…

Free forever — no account required

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Select the project type that matches your use case (Express API, React app, CLI tool, etc.) from the dropdown.
  2. Choose whether to include dev dependencies — select 'yes' for a full project setup or 'no' for a runtime-only manifest.
  3. Click the generate button to produce a complete, formatted package.json with dependencies, scripts, and metadata.
  4. Review the output, then copy it using the copy button and paste it into your project, fixture file, or documentation.

Use Cases

  • Seeding a Jest fixtures directory with varied package.json manifests to test a custom npm audit script
  • Creating a realistic Express API scaffold for a tutorial codebase without maintaining a live repository
  • Populating a Storybook or Figma code snippet that needs authentic-looking Node.js project metadata
  • Giving every participant the same baseline package.json at the start of a Node.js workshop
  • Testing a dependency vulnerability scanner against different project types like CLI tools and React apps

Tips

  • If you are generating fixtures to test a dependency parser, run the generator several times with different project types to get varied package names and script shapes.
  • For tutorial screenshots, set includeDevDeps to 'yes' so the dependencies object looks like a realistic project rather than a stripped-down example.
  • After copying the output, do a quick search-replace on the placeholder author and repository URL — it makes demo repos look much more convincing without any manual JSON editing.
  • CLI tool outputs produce a bin field in the JSON, which is useful if you need to test tooling that specifically handles executable package configurations.
  • Cross-reference the generated version numbers against npmjs.com for any packages you plan to keep in a real project — most are close but may lag a major version behind.

FAQ

what project types does the fake package.json generator support

The generator covers five types: Express API, React app, Next.js app, CLI tool, and library. Each pulls in a different dependency set — Express projects include middleware like cors and helmet, while React projects include react-dom and react-scripts with matching build commands.

are the dependency versions in the generated file real semver ranges

They use realistic semver strings based on well-known major version ranges for each package, not random numbers. They won't always reflect the latest published version, so verify against the npm registry and pin actual versions before running npm install on a real project.

can I use this as a starting point for an actual Node.js project

Yes — copy the output, update the name, version, description, and author fields, then confirm dependency versions on npmjs.com before installing. The scripts section is especially handy as a starting draft; rename or extend entries rather than writing them from scratch.