# d3-format

> Format numbers for human consumption.

Latest version **3.1.2** (published 2026-01-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install d3-format
pnpm add d3-format
yarn add d3-format
bun add d3-format
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.1.2 |
| Published | 2026-01-14 |
| First published | 2014-03-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/d3-format) |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 41.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 643 |
| Author | Mike Bostock |
| Maintainers | mbostock, recifs |
| Keywords | d3, d3-module, format, localization |

## Links

- npm: https://www.npmjs.com/package/d3-format
- Repository: https://github.com/d3/d3-format
- Homepage: https://d3js.org/d3-format/
- Issues: https://github.com/d3/d3-format/issues
- npm.io page: https://npm.io/package/d3-format

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 3.1.2 (latest) — 2026-01-14
- 3.1.1 — 2026-01-14
- 3.1.0 — 2021-12-04
- 3.0.1 — 2021-06-05
- 3.0.0 — 2021-04-24
- 3.0.0-rc.2 — 2021-04-24
- 3.0.0-rc.1 — 2021-04-24
- 2.0.0 — 2020-08-20
- 1.4.5 — 2020-08-20
- 2.0.0-rc.1 — 2020-07-27
- 1.4.4 — 2020-04-01
- 1.4.3 — 2019-12-29
- 1.4.2 — 2019-11-16
- 1.4.1 — 2019-09-05
- 1.4.0 — 2019-09-05
- … 28 more at https://npm.io/package/d3-format/versions

## README

# d3-format

<a href="https://d3js.org"><img src="https://github.com/d3/d3/raw/main/docs/public/logo.svg" width="256" height="256"></a>

This module formats numbers for human consumption, with a consistent output allowing comparison. Grouped digits, currencies, scientific notation…

## Resources

- [Documentation](https://d3js.org/d3-format)
- [Examples](https://observablehq.com/@d3/d3-format)
- [Releases](https://github.com/d3/d3-format/releases)
- [Getting help](https://d3js.org/community)

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