# Version Range

*noun*

say it: **“VUR-zhun RAYNJ”** **/ˈvɝʒən reɪndʒ/**

The set of versions of a package a project will accept, written with a symbol such as ^ or ~ before the version number.

## What is a **version range** in package.json?

A **version range** says which versions of a package your project accepts. `^4.21.0` takes any newer 4.x, `~4.21.0` only newer 4.21.x fixes, and `4.21.0` with no symbol exactly that one.

```json
"dependencies": {
  "express": "^4.21.0",
  "zod": "~3.23.8"
}
```

## In a sentence

- “Before upgrading, Priya checked each package's **version range** in package.json to see how far npm could go on its own.”
- “The **version range** ^4.21.0 let npm install 4.22.1 but never 5.0.0.”

Level: Journeyman · [More Node.js terms at this level](https://www.ask-codey.com/glossary?category=nodejs&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/version-range
