# uint8-util

> Fastest possible buffer-like utilities for uint8.

Latest version **2.3.2** (published 2026-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install uint8-util
pnpm add uint8-util
yarn add uint8-util
bun add uint8-util
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.3.2 |
| Published | 2026-07-20 |
| First published | 2022-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 82.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | ThaUnknown |
| Maintainers | thaunknown |
| Keywords | uint8, buffer, sha1, crypto, hex, tohex, tostring |

## Links

- npm: https://www.npmjs.com/package/uint8-util
- Repository: https://github.com/ThaUnknown/uint8-util
- Homepage: https://github.com/ThaUnknown/uint8-util#readme
- Issues: https://github.com/ThaUnknown/uint8-util/issues
- npm.io page: https://npm.io/package/uint8-util

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 2.3.2 (latest) — 2026-07-20
- 2.3.1 — 2026-07-20
- 2.3.0 — 2026-07-20
- 2.2.6 — 2026-01-15
- 2.2.5 — 2024-05-07
- 2.2.4 — 2023-09-16
- 2.2.3 — 2023-08-22
- 2.2.2 — 2023-07-29
- 2.2.1 — 2023-07-29
- 2.1.9 — 2023-02-06
- 2.1.8 — 2023-02-05
- 2.1.7 — 2023-01-30
- 2.1.6 — 2023-01-25
- 2.1.5 — 2023-01-24
- 2.1.4 — 2022-12-09
- … 8 more at https://npm.io/package/uint8-util/versions

## README

# Uint8 Utilities

This libraries brings features from Node's `Buffer` to JS's Uint8Arrays and in some cases other Typed Arrays, in the fastest ways possible, often faster than Node's own `Buffer`'s methods.

# Usage

```js
import { arr2text, text2arr, arr2hex, hex2arr, arr2base, base2arr } from 'uint8-util'

const str = arr2text(new Uint8Array([1, 2, 3]))

const uint8 = text2arr('uflnpq')

const hexString = arr2hex(new Uint8Array([1, 2, 3]))

const uint8 = hex2arr('abc')

const base64String = arr2base(new Uint8Array([89, 87, 74, 106, 77, 84, 73]))

const uint8 = base2arr('YWJjMTI')

import { concat, equal, hash, randomBytes } from 'uint8-util'

const joined = concat([[1,2,3], new Uint8Array([1, 2, 3])])

const same = equal([1,2,3], [1,2,3])

const hash = await hash('mystring')

const hash = await hash(new Uint8Array([1, 2, 3]))

const rand = arr2hex(randomBytes(128))

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