# @internationalized/number

> Internationalized number formatting and parsing utilities

Latest version **3.6.8** (published 2026-09-01) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @internationalized/number
pnpm add @internationalized/number
yarn add @internationalized/number
bun add @internationalized/number
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.6.8 |
| Published | 2026-09-01 |
| First published | 2021-02-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 231.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15847 |
| Maintainers | devongovett, aspro83 |

## Links

- npm: https://www.npmjs.com/package/@internationalized/number
- Repository: https://github.com/adobe/react-spectrum
- Homepage: https://github.com/adobe/react-spectrum#readme
- Issues: https://github.com/adobe/react-spectrum/issues
- npm.io page: https://npm.io/package/@internationalized/number

## Dependencies (1)

- [@swc/helpers](https://npm.io/package/@swc/helpers.md) ^0.5.0

## Recent versions

- 3.6.8 (latest) — 2026-09-01
- 3.0.0-nightly-16eead67e-260928 (nightly) — 2026-09-28
- 3.0.0-nightly-16eead67e-260927 — 2026-09-27
- 3.0.0-nightly-16eead67e-260926 — 2026-09-26
- 3.0.0-nightly-956ecbcb8-260925 — 2026-09-25
- 3.0.0-nightly-337f6a15a-260924 — 2026-09-24
- 3.0.0-nightly-f1cee8374-260923 — 2026-09-23
- 3.0.0-nightly-8ae29fa17-260922 — 2026-09-22
- 3.0.0-nightly-8ae29fa17-260921 — 2026-09-21
- 3.0.0-nightly-8ae29fa17-260920 — 2026-09-20
- 3.0.0-nightly-8ae29fa17-260919 — 2026-09-19
- 3.0.0-nightly-90ff0c6d6-260918 — 2026-09-18
- 3.0.0-nightly-be5bcc375-260917 — 2026-09-17
- 3.0.0-nightly-4693fcc84-260916 — 2026-09-16
- 3.0.0-nightly-4693fcc84-260915 — 2026-09-15
- … 1283 more at https://npm.io/package/@internationalized/number/versions

## README

# @internationalized/number

This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.

## NumberParser

The `NumberParser` class can be used perform locale-aware parsing of numbers from Unicode strings,
as well as validation of partial user input. It automatically detects the numbering system
used in the input, and supports parsing decimals, percentages, currency values, and units
according to the locale.

### Parsing

```js
import {NumberParser} from '@internationalized/number';

let parser = new NumberParser('en-US', {style: 'percent'});
parser.parse('10%'); // -> 0.1
```

### Validation

```js
import {NumberParser} from '@internationalized/number';

let parser = new NumberParser('en-US', {style: 'unit', unit: 'inch'});
parser.isValidPartialNumber('10 '); // -> true
parser.isValidPartialNumber('10 in'); // -> true
parser.isValidPartialNumber('10 i'); // -> false
parser.isValidPartialNumber('10 x'); // -> false
```

### Detecting the numbering system

```js
import {NumberParser} from '@internationalized/number';

let parser = new NumberParser('en-US', {style: 'decimal'});
parser.getNumberingSystem('١٢') // -> 'arabic'
```

## NumberFormatter

The `NumberFormatter` class is a wrapper around [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) providing additional options, polyfills, and caching for performance. It provides the exact same interface as Intl.NumberFormat, so it is a drop-in replacement. Please see the MDN docs linked above for more details.

We currently polyfill the following features:

* The `signDisplay` option
* The `unit` style, currently only for the `degree` unit in the `narrow` style

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