# unstorage

> Universal Storage Layer

Latest version **1.17.5** (published 2026-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install unstorage
pnpm add unstorage
yarn add unstorage
bun add unstorage
```

## Health

**Score 65/100 (B)** — status: stable.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.17.5 |
| Published | 2026-03-26 |
| First published | 2021-03-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 345.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2647 |
| Maintainers | pi0 |

## Links

- npm: https://www.npmjs.com/package/unstorage
- Repository: https://github.com/unjs/unstorage
- Homepage: https://unstorage.unjs.io
- Issues: https://github.com/unjs/unstorage/issues
- npm.io page: https://npm.io/package/unstorage

## Dependencies (8)

- [h3](https://npm.io/package/h3.md) ^1.15.10
- [ufo](https://npm.io/package/ufo.md) ^1.6.3
- [destr](https://npm.io/package/destr.md) ^2.0.5
- [ofetch](https://npm.io/package/ofetch.md) ^1.5.1
- [anymatch](https://npm.io/package/anymatch.md) ^3.1.3
- [chokidar](https://npm.io/package/chokidar.md) ^5.0.0
- [lru-cache](https://npm.io/package/lru-cache.md) ^11.2.7
- [node-fetch-native](https://npm.io/package/node-fetch-native.md) ^1.6.7

## Recent versions

- 1.17.5 (latest) — 2026-03-26
- 2.0.0-alpha.10 (alpha) — 2026-09-03
- 0.2.10 (2x) — 2022-08-17
- 0.3.4 (3x) — 2022-08-01
- 0.4.2 (4x) — 2022-08-01
- 2.0.0-alpha.9 — 2026-08-20
- 2.0.0-alpha.8 — 2026-08-20
- 2.0.0-alpha.7 — 2026-03-19
- 2.0.0-alpha.6 — 2026-02-25
- 1.17.4 — 2026-01-15
- 2.0.0-alpha.5 — 2026-01-07
- 1.17.3 — 2025-11-20
- 1.17.2 — 2025-10-31
- 2.0.0-alpha.4 — 2025-10-28
- 2.0.0-alpha.3 — 2025-10-07
- … 74 more at https://npm.io/package/unstorage/versions

## README

# 💾 Unstorage

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Codecov][codecov-src]][codecov-href]
[![bundle][bundle-src]][bundle-href]
[![License][license-src]][license-href]

<!--[![Github Actions][github-actions-src]][github-actions-href]-->

Unstorage provides an async Key-Value storage API with conventional features like multi driver mounting, watching and working with metadata, dozens of built-in drivers and a [tiny core](https://bundlephobia.com/package/unstorage).

👉 [Documentation](https://unstorage.unjs.io)

## Features

- Designed for all environments: Browser, NodeJS, and Workers
- Lots of Built-in drivers
- Asynchronous API
- Unix-style driver mounting to combine storages
- Default [in-memory](https://unstorage.unjs.io/drivers/memory) storage
- Tree-shakable utils and tiny core
- Auto JSON value serialization and deserialization
- Binary and raw value support
- State [snapshots](https://unstorage.unjs.io/getting-started/utils#snapshots) and hydration
- Storage watcher
- HTTP Storage with [built-in server](https://unstorage.unjs.io/guide/http-server)

## Usage

Install `unstorage` npm package:

```sh
# yarn
yarn add unstorage

# npm
npm install unstorage

# pnpm
pnpm add unstorage
```

```js
import { createStorage } from "unstorage";

const storage = createStorage(/* opts */);

await storage.getItem("foo:bar"); // or storage.getItem('/foo/bar')
```

👉 Check out the [the documentation](https://unstorage.unjs.io) for usage information.

## Nightly release channel

You can use the nightly release channel to try the latest changes in the `main` branch via [`unstorage-nightly`](https://www.npmjs.com/package/unstorage-nightly).

If directly using `unstorage` in your project:

```json
{
  "devDependencies": {
    "unstorage": "npm:unstorage-nightly"
  }
}
```

If using `unstorage` via another tool in your project:

```json
{
  "resolutions": {
    "unstorage": "npm:unstorage-nightly"
  }
}
```

## Contribution

- Clone repository
- Install dependencies with `pnpm install`
- Use `pnpm dev` to start jest watcher verifying changes
- Use `pnpm test` before pushing to ensure all tests and lint checks passing

## License

[MIT](./LICENSE)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/unstorage?style=flat&colorA=18181B&colorB=F0DB4F
[npm-version-href]: https://npmjs.com/package/unstorage
[npm-downloads-src]: https://img.shields.io/npm/dm/unstorage?style=flat&colorA=18181B&colorB=F0DB4F
[npm-downloads-href]: https://npmjs.com/package/unstorage
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/unstorage/ci/main?style=flat&colorA=18181B&colorB=F0DB4F
[github-actions-href]: https://github.com/unjs/unstorage/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/unstorage/main?style=flat&colorA=18181B&colorB=F0DB4F
[codecov-href]: https://codecov.io/gh/unjs/unstorage
[bundle-src]: https://img.shields.io/bundlephobia/minzip/unstorage?style=flat&colorA=18181B&colorB=F0DB4F
[bundle-href]: https://bundlephobia.com/result?p=unstorage
[license-src]: https://img.shields.io/github/license/unjs/unstorage.svg?style=flat&colorA=18181B&colorB=F0DB4F
[license-href]: https://github.com/unjs/unstorage/blob/main/LICENSE

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