https://github.com/shahradelahi/base32
🔢 Base32 encoder and decoder for TypeScript/JavaScript, supporting both RFC 4648 and Crockford variants.
https://github.com/shahradelahi/base32
base32 crockford decoder encoder isomorphic rfc4648 typescript
Last synced: 7 months ago
JSON representation
🔢 Base32 encoder and decoder for TypeScript/JavaScript, supporting both RFC 4648 and Crockford variants.
- Host: GitHub
- URL: https://github.com/shahradelahi/base32
- Owner: shahradelahi
- License: mit
- Created: 2025-09-07T22:46:31.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-01T08:36:03.000Z (7 months ago)
- Last Synced: 2025-10-10T05:12:14.617Z (7 months ago)
- Topics: base32, crockford, decoder, encoder, isomorphic, rfc4648, typescript
- Language: TypeScript
- Homepage: https://npmjs.com/@se-oss/base32
- Size: 86.9 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @se-oss/base32
[](https://github.com/shahradelahi/base32/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/@se-oss/base32)
[](/LICENSE)
[](https://packagephobia.com/result?p=@se-oss/base32)
A simple base32 encoder and decoder supporting both RFC 4648 and Crockford variants.
---
- [Installation](#-installation)
- [Usage](#-usage)
- [RFC 4648](#rfc-4648)
- [Crockford](#crockford)
- [Documentation](#-documentation)
- [Future Enhancements](#-future-enhancements)
- [Contributing](#-contributing)
- [License](#license)
## 📦 Installation
```bash
pnpm add @se-oss/base32
```
## 📖 Usage
### RFC 4648
```typescript
import { decode, encode } from '@se-oss/base32';
const encoded = encode('hello world');
console.log(encoded); // NBSWY3DPEB3W64TMMQ======
const decoded = decode(encoded);
console.log(new TextDecoder().decode(decoded)); // hello world
```
### Crockford
```typescript
import { crockfordDecode, crockfordEncode } from '@se-oss/base32';
const encoded = crockfordEncode('hello world');
console.log(encoded); // D1JPRV3F41VPYWKCCG======
const decoded = crockfordDecode(encoded);
console.log(new TextDecoder().decode(decoded)); // hello world
```
## 📚 Documentation
For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/base32).
## 🚀 Future Enhancements
- [ ] Implement Crockford's checksum feature.
## 🤝 Contributing
Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/base32)
Thanks again for your support, it is much appreciated! 🙏
## License
[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/base32/graphs/contributors).