JSON Formatter for package.json

Your data never leaves your browser

A broken package.json stops npm install dead. Format and validate to catch syntax issues before committing.

Example

{
  "name": "my-app",
  "scripts": {"dev": "next dev", "build": "next build"},
  "dependencies": {"next": "^16.0.0", "react": "^19.0.0"}
}

Tips

  1. 1Use 2-space indentation (npm default).
  2. 2Validate after merge conflicts.
  3. 3Tree view for nested config sections.

Frequently Asked Questions

Why does npm install fail?

Usually a missing comma or mismatched quotes. Paste here to see the error.

Sort dependencies?

Format first, then sort dependency blocks in editor.

Validates npm rules?

JSON syntax only. Use npm pkg fix for npm-specific validation.