package.json file
Paste your package.json
Click Validate to check for errors// validate package.json syntax instantly
Validate package.json syntax instantly in the browser. Check required fields, semver versions, scripts, dependencies, and common mistakes. Free, no sign-up.
package.json file
Paste your package.json
Click Validate to check for errorsCopy the full contents of your package.json and paste it into the editor on the left.
The tool checks JSON syntax, required fields, semver versions, and common npm mistakes.
Errors and warnings appear with clear descriptions. Fix issues and re-validate until everything is green.
name or version fieldv1.0)dependencies objectThe Package.json Validator checks your npm package manifest for JSON syntax errors and semantic issues. It goes beyond basic JSON parsing to verify field types, semver version formats, and npm-specific conventions — all client-side with no file upload needed.
It checks JSON syntax first, then verifies required fields (name, version), semver format on version, that dependencies, devDependencies, peerDependencies, and scripts are plain objects, and that common string fields like description, license, and main are actually strings.
No. All validation runs entirely in your browser using JavaScript. Your file contents never leave your device and are never sent to any server.
The validator accepts standard semver strings like 1.0.0, 2.3.1-beta.1, and 0.0.1-alpha+build.123. It flags strings with a leading v (e.g. v1.0.0) and non-numeric or missing segments.
Yes. Scoped package names like @myorg/my-package are recognized as valid. The "private": true field is also detected and noted in the fields overview.
Errors (🔴) are issues that will likely cause npm to reject or misread your package — invalid JSON or a missing name field, for example. Warnings (🟡) are best-practice violations or suspicious values that may cause problems but won't necessarily break anything immediately.
Yes. Paste any individual package.json — root workspace manifest or sub-package — and the validator will check it. Note that workspace-specific fields like workspaces are recognized and listed in the fields overview.
Every Node.js project and npm package relies on a package.json file as its manifest. A single typo, a missing comma, or an invalid version string can cause npm install to fail, break CI pipelines, or prevent a package from publishing. Our free browser-based Package.json Validator catches these issues in seconds — no install, no sign-up, no upload required.
The package.json file is the heart of any Node.js project. It defines the package name, version, description, author, license, entry points, scripts, and dependency lists. When you run npm install, npm publish, or any npm lifecycle command, npm reads this file first. If it's invalid JSON or missing required fields, the command will fail immediately with a cryptic error message.
JSON syntax errors are the most obvious problem — a trailing comma, an unmatched brace, or an unescaped character will break parsing entirely. But beyond syntax, there are dozens of semantic rules: the version field must follow Semantic Versioning (semver), the dependencies field must be a plain object (not an array), and fields like main and description must be strings. Our validator checks all of these automatically.
.json5 or a linter for that).@scope/pkg are valid. Names cannot contain uppercase letters or spaces.The version field of a package must use strict semver: MAJOR.MINOR.PATCH. For example, 1.0.0, 2.3.1, or 0.0.1-alpha.1 are all valid. A leading v like v1.0.0 is technically not valid semver for the version field (although it is valid in version ranges inside dependencies). Our validator flags these edge cases so you can fix them before publishing.
Even experienced developers make mistakes in package.json. Some of the most common include: adding a trailing comma after the last field (not valid in JSON), using single quotes instead of double quotes, forgetting to quote version range strings inside dependencies, setting dependencies to an array instead of an object, or using a version string like latest directly in the version field rather than in a dependency range.
Once your file passes validation, you can click "Format JSON" to reformat it with consistent 2-space indentation. This is useful if you've manually edited your package.json and want to restore clean formatting before committing it to version control.
The entire validation engine runs in JavaScript inside your browser tab. There is no server involved, no API call, and no data retention. You can use this tool on sensitive internal packages without any privacy concern. It works on all modern browsers and mobile devices with no installation.