# @solana/fast-stable-stringify

> Deterministic stringification for when performance and bundle size matters

Latest version **8.3.0** (published 2026-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @solana/fast-stable-stringify
pnpm add @solana/fast-stable-stringify
yarn add @solana/fast-stable-stringify
bun add @solana/fast-stable-stringify
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.3.0 |
| Published | 2026-09-09 |
| First published | 2024-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.18.0 |
| Dependencies | 0 |
| Unpacked size | 53.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 695 |
| Author | Solana Labs Maintainers |
| Maintainers | solana-devs |
| Keywords | JSON, stable, deterministic, stringify, fast, BigInt |

## Links

- npm: https://www.npmjs.com/package/@solana/fast-stable-stringify
- Repository: https://github.com/anza-xyz/kit
- Homepage: https://github.com/anza-xyz/kit#readme
- Issues: https://github.com/anza-xyz/kit/issues
- npm.io page: https://npm.io/package/@solana/fast-stable-stringify

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 8.3.0 (latest) — 2026-09-09
- 8.4.0-canary-20260924083259 (canary) — 2026-09-24
- 5.1.0-experimental-20251205104522 (experimental) — 2025-12-05
- 4.0.0 (4x) — 2025-10-08
- 3.0.3 (3x) — 2025-09-11
- 2.0.0 (next) — 2024-11-07
- 2.0.0-rc.4 (rc) — 2024-11-05
- 2.0.0-preview.4.20240731091009.c2717fc498afa3228c8f8b01600a575989afae99 (preview) — 2024-07-31
- 2.0.0-preview.4 (tp4) — 2024-07-02
- 2.0.0-preview.3 (tp3) — 2024-04-25
- 8.4.0-canary-20260923083123 — 2026-09-23
- 8.4.0-canary-20260922155338 — 2026-09-22
- 8.4.0-canary-20260922151509 — 2026-09-22
- 8.4.0-canary-20260922084122 — 2026-09-22
- 8.4.0-canary-20260922083419 — 2026-09-22
- … 1772 more at https://npm.io/package/@solana/fast-stable-stringify/versions

## README

# fast-stable-stringify

This project is a fork of [nickyout/fast-stable-stringify](https://github.com/nickyout/fast-stable-stringify)

The most popular repository providing this feature is [substack's json-stable-stringify](https://www.npmjs.com/package/json-stable-stringify). The intent of this library is to provide a faster alternative for when performance is more important than features. It assumes you provide basic javascript values without circular references, and returns a non-indented string.

Usage:

```javascript
import stringify from '@solana/fast-stable-stringify';
stringify({ d: 0, c: 1, a: 2, b: 3, e: 4 }); // '{"a":2,"b":3,"c":1,"d":0,"e":4}'
```

Just like substack's, it:

- handles all variations of all basic javascript values (number, string, boolean, array, object, null, Date, BigInt)
- handles undefined _and_ function in the same way as `JSON.stringify`
- **does not support ie8 (and below) with complete certainty**.

Unlike substack's, it:

- does not implement the 'replacer' or 'space' arguments of the JSON.stringify method
- does not check for circular references

## Running tests

```
npm run test:unit:browser
npm run test:unit:node
```

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