# node-red-node-base64

> A Node-RED node to pack and unpack objects to base64 format

Latest version **1.0.0** (published 2025-04-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install node-red-node-base64
pnpm add node-red-node-base64
yarn add node-red-node-base64
bun add node-red-node-base64
```

## Health

**Score 40/100 (D)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2025-04-14 |
| First published | 2014-11-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1089 |
| Author | Dave Conway-Jones |
| Maintainers | knolleary, dceejay |
| Keywords | node-red, base64 |

## Links

- npm: https://www.npmjs.com/package/node-red-node-base64
- Repository: https://github.com/node-red/node-red-nodes
- Homepage: https://github.com/node-red/node-red-nodes#readme
- Issues: https://github.com/node-red/node-red-nodes/issues
- npm.io page: https://npm.io/package/node-red-node-base64

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M 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
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2025-04-14
- 0.3.0 — 2021-03-12
- 0.2.1 — 2020-02-26
- 0.2.0 — 2019-10-28
- 0.1.3 — 2018-04-29
- 0.1.1 — 2018-02-03
- 0.1.0 — 2018-01-30
- 0.0.8 — 2017-11-10
- 0.0.6 — 2017-06-30
- 0.0.4 — 2016-11-06
- 0.0.3 — 2016-09-15
- 0.0.2 — 2016-03-02
- 0.0.1 — 2014-11-18

## README

node-red-node-base64
====================

A <a href="http://nodered.org" target="_new">Node-RED</a> node to encode and decode base64 format messages.


Install
-------

Run the following command in your Node-RED user directory - typically `~/.node-red`

    npm i node-red-node-base64

Usage
-----

A function that converts the `msg.payload` to and from base64 format.

If the input is a binary buffer it converts it to a Base64 encoded string.

If the input is a Base64 string it converts it back to a binary buffer.

Sample Flow
-----------

<pre><code>[{"id":"d2ccae00.2d335","type":"inject","name":"","topic":"","payload":"","payloadType":"none","repeat":"","crontab":"","once":false,"x":136,"y":99,"z":"385bdf8b.c7a42","wires":[["e03cae10.1fc35"]]},{"id":"b778ef09.48871","type":"base64","name":"","x":411.5,"y":160,"z":"385bdf8b.c7a42","wires":[["6295d1b1.9d6a3","46b597ba.b94a68"]]},{"id":"6295d1b1.9d6a3","type":"debug","name":"","active":true,"console":"false","complete":"false","x":610,"y":160,"z":"385bdf8b.c7a42","wires":[]},{"id":"ead9e7c9.152618","type":"debug","name":"","active":true,"console":"false","complete":"false","x":610,"y":240,"z":"385bdf8b.c7a42","wires":[]},{"id":"46b597ba.b94a68","type":"base64","name":"","x":411.5,"y":240,"z":"385bdf8b.c7a42","wires":[["ead9e7c9.152618"]]},{"id":"1c9124e9.e36edb","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":1775,"y":113,"z":"385bdf8b.c7a42","wires":[[]]},{"id":"48a892ea.b7576c","type":"debug","name":"","active":true,"console":"false","complete":"false","x":2171,"y":210,"z":"385bdf8b.c7a42","wires":[]},{"id":"e03cae10.1fc35","type":"function","name":"","func":"msg.payload = new Buffer.from(\"12345\");\nreturn msg;","outputs":1,"x":250,"y":160,"z":"385bdf8b.c7a42","wires":[["b778ef09.48871"]]}]
</code></pre>

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