Skip to content
🛠️ToolsShed

Base58 Encoder / Decoder

Encode text to Base58 or decode Base58 strings. Used in Bitcoin addresses and IPFS CIDs.

About this tool

Base58 is a binary-to-text encoding scheme that converts raw data into a human-readable string using 58 alphanumeric characters. Unlike Base64, which includes symbols that can be confused or problematic in URLs and addresses, Base58 removes characters like 0 (zero), O (uppercase O), I (uppercase I), and l (lowercase L) to avoid visual ambiguity. This encoding is widely recognized for securing cryptocurrency addresses—especially Bitcoin—and for encoding content identifiers in IPFS, the InterPlanetary File System.

To use this encoder, paste your text or raw data into the input field and click the encode button to generate a Base58 string. To decode, simply paste a valid Base58-encoded string and click decode to recover the original data. The tool works entirely in your browser, processing all conversions instantly without sending anything to external servers. This is particularly useful for developers working with blockchain data, content-addressed systems, or any application needing to verify Bitcoin addresses, IPFS hashes, or other cryptographic identifiers.

Base58 encoding is especially valuable in cryptocurrency and decentralized applications because it reduces transcription errors when sharing addresses manually or via paper wallets. The removal of visually similar characters makes Base58 addresses much easier to read and verify by eye compared to Base64. Whether you're a blockchain developer, a system administrator managing IPFS nodes, or someone simply curious about how Bitcoin addresses are encoded, this tool makes Base58 encoding and decoding transparent and accessible.

Frequently Asked Questions

Code Implementation

import base58  # pip install base58

# Encode text to Base58
text = "Hello, World!"
encoded = base58.b58encode(text.encode()).decode()
print(encoded)  # JxF12TrwUP45BMd

# Decode Base58 back to text
decoded = base58.b58decode(encoded).decode()
print(decoded)  # Hello, World!

# Manual implementation without library
ALPHABET = b"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"

def encode(data: bytes) -> str:
    num = int.from_bytes(data, "big")
    result = b""
    while num > 0:
        num, rem = divmod(num, 58)
        result = bytes([ALPHABET[rem]]) + result
    pad = len(data) - len(data.lstrip(b"\x00"))
    return (b"1" * pad + result).decode()

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.