Web & Standards
package.json (npm) JSON Example
A complete package.json JSON example for a Node.js / npm project — includes scripts, dependencies, devDependencies, engines, and metadata. Copy-ready starter for any JavaScript package.
Field Reference
namerequiredstringPackage name; lowercase, URL-safe, optionally scoped with @scope/versionrequiredstringSemantic version (major.minor.patch)typeoptionalstring'module' for ESM or 'commonjs' for CJS; controls how .js files are interpretedexportsoptionalobjectModern entry-point map; supersedes 'main' for conditional importsscriptsoptionalobjectNamed commands run via npm run <name>dependenciesoptionalobjectRuntime packages with semver ranges, installed for consumersdevDependenciesoptionalobjectBuild/test-only packages, not installed by consumersenginesoptionalobjectDeclares supported runtime versions, e.g. node >=18Variants
Minimal appThe smallest practical package.json for a private application.
Common Use Cases
- →Bootstrapping a new npm library or Node.js application
- →Defining build, test, and lint scripts for a project
- →Pinning dependency versions and supported Node engines
package.jsonnpmnodejavascriptdependencies
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.
Frequently Asked Questions
Related JSON Examples
DevOpsTypeScript Config (tsconfig.json)Modern tsconfig.json with strict mode, bundler resolution, path aliases, and JSX.DataApp Config FileBackend config with database connection, auth settings, feature flags, and logging.DevOpsFeature FlagsFeature flag config JSON with rollout percentages, variants, and flag dependencies.