# react-native-base64

> Base64 encoding and decoding helping util. Created for React Native but can be used anywhere

Latest version **0.2.2** (published 2025-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-base64
pnpm add react-native-base64
yarn add react-native-base64
bun add react-native-base64
```

## Health

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

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

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2025-09-21 |
| First published | 2018-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/react-native-base64) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 150 |
| Author | eranbo |
| Maintainers | eranbo |
| Keywords | base64, encode, decode, react, native |

## Links

- npm: https://www.npmjs.com/package/react-native-base64
- Repository: https://github.com/eranbo/react-native-base64
- Homepage: https://github.com/eranbo/react-native-base64#readme
- Issues: https://github.com/eranbo/react-native-base64/issues
- npm.io page: https://npm.io/package/react-native-base64

## 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

- 0.2.2 (latest) — 2025-09-21
- 0.2.1 — 2020-12-11
- 0.2.0 — 2020-12-11
- 0.1.1 — 2020-12-11
- 0.1.0 — 2020-07-18
- 0.0.2 — 2018-10-05
- 0.0.1 — 2018-07-20
- 0.0.1-security — 2018-07-18

## README

If you find this package useful hit the star with <3

[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png)](https://www.buymeacoffee.com/eranbo)

# react-native-base64
Base64 encoding and decoding helping util (does not support some Unicode characters).  
Created for React Native but can be used anywhere.

Install  
```
npm i react-native-base64
```  
You can find it on npmjs.com here: [https://www.npmjs.com/package/react-native-base64](https://www.npmjs.com/package/react-native-base64)

How to use:  
Add import statement:
```
import base64 from 'react-native-base64'
```
To Encode:  
```
base64.encode('Some string to encode to base64');
```
To Decode:
```
base64.decode('SW4gbXkgZXllcywgaW5kaXNwb3NlZA0KSW4gZGlzZ3Vpc2VzIG5vIG9uZSBrbm93cw0KUklQIEND==');
```
To Decode from byte arary:
```
base64.encodeFromByteArray(byteArray: Uint8Array);
```

Do you like this package? Do you find it useful?  
Please rank it with a star and leave a comment.  
Thanks :)

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