Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/encoding/base32.ts

The Deno Standard Library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.222.0/encoding/base32.ts";

Utilities for base32 encoding and decoding.

Modified from https://github.com/beatgammit/base64-js.

This module is browser compatible.

import { encodeBase32, decodeBase32 } from "https://deno.land/std@0.222.0/encoding/base32.ts";

const encoded = encodeBase32("foobar"); // "MZXW6YTBOI======"

decodeBase32(encoded); // Uint8Array(6) [ 102, 111, 111, 98, 97, 114 ]

Functions

Decodes a base32-encoded string.

Converts data into a base32-encoded string.