๐Ÿ“ฆ package.json Validator

Check field completeness, version formats, dependency conflicts, script syntax
Zero Dependencies | No Signup, Client-Side ยท No Server Uploads

๐Ÿ“‹ Input package.json

๐Ÿ“ Drag & drop package.json file here
Errors: 0
Warnings: 0
Passed: 0

What Can the package.json Validator Do?

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.

Core Features

How to Use

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

Use Cases

Case 1: Pre-Publish Check

Before publishing an NPM package, ensure package.json is complete and valid using this tool.

Case 2: Project Initialization

Verify package.json configuration after creating a new project to avoid installation and build issues.

Case 3: Dependency Upgrade Review

Check version formats and dependency conflicts after upgrading dependencies.

Case 4: Code Review

Quickly validate package.json changes in pull requests.

Technical Background

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.

โ“ What does the validator check?

Required fields (name/version), recommended fields, version format (semver), dependency conflicts, scripts syntax, engines field.

โ“ How are dependency conflicts detected?

Checks for packages in both dependencies and devDependencies, and whether peerDependencies are properly declared.

โ“ Does this tool upload my data?

No. All validation is done locally in the browser. No data is sent to any server.

โ“ Which package.json versions are supported?

Supports npm v7+ format including workspaces, overrides, peerDependenciesMeta.

โ“ Can I fix found issues?

Yes. Some issues can be auto-fixed (missing fields, field sorting). Download the fixed version.

โ“ Can I import from a file?

Yes. Drag and drop a package.json file into the input area.

package.json Validator | No Signup, Client-Side ยท No Server Uploads

Feedback: dexshuang@google.com