consolelog.tools

Package.json Dependency Updater

Analyze and update package.json dependencies with version strategies

About this ToolHow it works, benefits & use cases

Paste a package.json and this tool reads its dependency tree, then rewrites version ranges to whatever update policy you pick. "Analyze dependencies" parses your dependencies and devDependencies, counts them, and classifies each entry by range type — caret (^), tilde (~), exact, range, or latest — so you can see at a glance how loose or pinned your manifest is. "Update versions" then rewrites every range to a single strategy: caret to allow minor and patch updates, tilde for patch-only, exact to lock to a precise version, or latest. It returns a clean, re-indented package.json you can paste straight back, plus a list of ready-to-run update commands for npm, Yarn, or pnpm. It works on the JSON you give it — no registry calls — so your manifest never leaves the browser.

How to Use

  1. 1Choose a version strategy (Caret, Tilde, Exact, or Latest) and your package manager (npm, Yarn, or pnpm) from the two dropdowns.
  2. 2Paste your package.json into the input panel, or click "Load example" to try the sample manifest.
  3. 3Click "Analyze dependencies" to see counts and the per-package range type for dependencies and devDependencies.
  4. 4Click "Update versions" to rewrite every range to your chosen strategy and get a clean package.json back.
  5. 5Copy the updated package.json, or copy the generated update commands to run in your project root.

Key Benefits

  • Classifies every dependency by range type — caret, tilde, exact, range, or latest
  • Counts dependencies and devDependencies separately with at-a-glance stats
  • Rewrites all ranges to one consistent strategy in a single click
  • Returns clean, re-indented JSON ready to paste back into your project
  • Generates the matching update commands for npm, Yarn, or pnpm
  • Built-in strategy guide explains what caret, tilde, exact, and latest mean
  • Works entirely on your pasted JSON — no network or registry lookups

Common Use Cases

  • Standardising a messy manifest where some deps use ^, some ~, and some are pinned
  • Locking every dependency to an exact version before a production release
  • Loosening pins to caret ranges so a project can pick up minor updates
  • Auditing how many dependencies vs devDependencies a project actually has
  • Generating the right yarn upgrade or pnpm update command for a batch of packages

Update settings

Paste your package.json — dependencies and devDependencies will be extracted.

Version strategy guide

Caret (^):
Allows minor and patch updates (e.g., ^1.2.3 matches 1.x.x)
Tilde (~):
Allows patch updates only (e.g., ~1.2.3 matches 1.2.x)
Exact:
Locks to a specific version (e.g., 1.2.3)
Latest:
Always uses the latest version (not recommended for production)

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools