The package.json Validator is a free online tool for checking whether a Node.js project's package.json file conforms to specifications. It supports required field checks, version format validation, dependency conflict detection, and script syntax checking, helping developers ensure their package.json configuration is correct.
1. Paste package.json content in the input box, or drag and drop a file
2. Click "Validate" to see check results
3. Errors (red) must be fixed, warnings (yellow) should be fixed, passed (green) is OK
4. Click "Auto Fix" to fix common issues
5. Use "Download Fixed" to save the corrected package.json
6. Keyboard shortcut: Ctrl+Enter to validate quickly
Before publishing an NPM package, ensure package.json is complete and valid using this tool.
Verify package.json configuration after creating a new project to avoid installation and build issues.
Check version formats and dependency conflicts after upgrading dependencies.
Quickly validate package.json changes in pull requests.
package.json is the core configuration file for Node.js projects. npm v7+ supports workspaces, overrides, and other new fields. Only name and version are required, but adding description, keywords, license, and repository is recommended for better package discoverability. Version numbers follow semver (major.minor.patch), and dependency version ranges use ^, ~ prefixes. peerDependencies declare dependencies the host environment must provide.
Required fields (name/version), recommended fields, version format (semver), dependency conflicts, scripts syntax, engines field.
Checks for packages in both dependencies and devDependencies, and whether peerDependencies are properly declared.
No. All validation is done locally in the browser. No data is sent to any server.
Supports npm v7+ format including workspaces, overrides, peerDependenciesMeta.
Yes. Some issues can be auto-fixed (missing fields, field sorting). Download the fixed version.
Yes. Drag and drop a package.json file into the input area.