# windows-release

> Get the name of a Windows version from the release number: `5.1.2600` → `XP`

Latest version **7.1.1** (published 2026-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install windows-release
pnpm add windows-release
yarn add windows-release
bun add windows-release
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.1.1 |
| Published | 2026-02-24 |
| First published | 2018-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 1 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 48 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | os, win, win32, windows, operating, system, platform, name, title, release, version |

## Links

- npm: https://www.npmjs.com/package/windows-release
- Repository: https://github.com/sindresorhus/windows-release
- Homepage: https://github.com/sindresorhus/windows-release#readme
- Issues: https://github.com/sindresorhus/windows-release/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/windows-release

## Dependencies (1)

- [powershell-utils](https://npm.io/package/powershell-utils.md) ^0.2.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 7.1.1 (latest) — 2026-02-24
- 7.1.0 — 2026-02-02
- 7.0.0 — 2025-09-12
- 6.1.0 — 2025-05-21
- 6.0.1 — 2024-06-10
- 6.0.0 — 2023-11-08
- 5.1.1 — 2023-06-06
- 5.1.0 — 2023-01-15
- 5.0.1 — 2021-11-11
- 5.0.0 — 2021-08-09
- 4.0.0 — 2020-08-10
- 3.3.3 — 2020-08-10
- 3.3.2 — 2020-08-10
- 3.3.1 — 2020-06-08
- 3.3.0 — 2020-04-06
- … 2 more at https://npm.io/package/windows-release/versions

## README

# windows-release

> Get the name of a Windows version from the release number: `5.1.2600` → `XP`

## Install

```sh
npm install windows-release
```

## Usage

```js
import os from 'node:os';
import windowsRelease from 'windows-release';

// On a Windows XP system

windowsRelease();
//=> 'XP'

os.release();
//=> '5.1.2600'

windowsRelease(os.release());
//=> 'XP'

windowsRelease('4.90.3000');
//=> 'ME'
```

## API

### windowsRelease(release?)

Returns: `string | undefined`

Returns the Windows version name, or `undefined` if the version is not recognized or does not exist.

#### release

Type: `string`

By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).

Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`.

## Related

- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system
- [macos-release](https://github.com/sindresorhus/macos-release) - Get the name and version of a macOS release from the Darwin version

---
_Source: https://npm.io/package/windows-release · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
