Multibase Encoder and Decoder
Encode bytes with a self-identifying multibase prefix, or detect the prefix and decode an existing multibase string.
Runs in your browser — your input is processed on this device and never uploaded.
Input
Enter text or upload a file to encode. To decode, enter the encoded text.
Used only when encoding. Decoding detects the base from its prefix.
Result
Results appear here.
About this tool
On this page
What is multibase?
Multibase puts one character in front of encoded data to say which base and alphabet follow, so a decoder needs no separate setting. The specification comes from the Multiformats project, and IPFS content identifiers are its best-known users.
Multibase options
- Operation
- Encode (the default) or Decode.
- Data
- Text or a file to encode, or a complete prefixed multibase string to decode.
- Base
- One of 21 bases, base64 by default. Used only when encoding; decoding reads the base from the prefix and reports it.
- Base10 and Base36 are limited to 1 MiB of decoded data and 3 MiB of encoded text, because they convert the input as one large number.
- The identity base, which adds only the prefix, accepts valid UTF-8 input only.
| Prefix | Base | Alphabet |
|---|---|---|
| 0 | base2 | Binary digits |
| f | base16 | Lowercase hexadecimal |
| b | base32 | RFC 4648 Base32, lowercase, no padding |
| k | base36 | 0-9 and a-z |
| m | base64 | RFC 4648 Base64, no padding |
| u | base64url | URL-safe Base64, no padding |
Why put the base in the data
A bare string such as 3q2+7w could be Base64 or something else, and guessing wrong decodes to garbage without an error. A one-character prefix makes the string self-describing, so systems that pass identifiers around, such as IPFS, can change their preferred base without breaking older values.
Multibase alternatives
Base64, Base32 and Hex produce the same alphabets without the prefix, for when the other side already knows the base. Base58 handles the base58btc form used by did:key identifiers (prefix z), which this page does not accept: decode the part after the z there.
Things to know about multibase
The prefix is part of the value. Strip it and the string is no longer multibase, and a decoder can no longer tell which base it was.
Base256emoji and the two Base58 forms are left out on purpose. The emoji base does not round-trip reliably in the library this tool uses, and whole-buffer Base58 is better handled by the dedicated tool.
Warning
Encoding does not encrypt, compress, hash or authenticate the data.
Browse
Find similar tools by category or tag.