Base58 Encode Decode

Plain text is first converted to UTF-8 bytes, then encoded as Base58 or Base58Check.

0 input chars

Encode and decode Base58 or Base58Check in the browser, with support for text, files, custom alphabets, and hex output.

Related

What are Base58 and Base58Check?

Base58 is a text encoding intended for human reading and copy-pasting. It will remove easily misread characters such as 0, O, I, and l, so it is often used in scenarios such as short logos, invitation codes, wallet addresses, and offline sharing codes.

The standard Bitcoin Base58 character table is `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`. This page supports both the Flickr version of the alphabet, and your own defined 58-character alphabet.

Base58Check is a solution that appends a 4-byte checksum after the original bytes, and then encodes it into Base58 as a whole. It is often used for old Bitcoin addresses, WIF private key exports, invitation codes or strings that need to be transcribed manually. The goal is to detect typos, missing words or out of order earlier.

If you get a binary payload, address payload, or hash fragment, the decoded content is not necessarily readable text. At this time, it is more suitable to switch to hexadecimal to view, rather than misjudging garbled characters as decoding failure.

IPFS CIDv0 uses the standard Base58btc instead of Base58Check; `bc1...` This type of Bitcoin address belongs to Bech32 and is not within the scope of this page Base58.

Use Cases

  • Verify whether the old Bitcoin address, WIF private key export string or custom Base58Check sharing code has been entered incorrectly.
  • Encode small files, binary fragments or test payloads into Base58 for easy delivery in logs, chats or tickets.
  • Decode the Base58 string into hexadecimal and then analyze it for version bytes, hash, or raw payload.
  • Compare the output between Bitcoin Base58 and Flickr Base58 to find out why the same set of bytes has different results in different systems.
  • Design your own 58-character character table for internal invitation codes, short logos, or offline tokens, and verify that both ends are consistent.

How to Use

  1. Select encoding or decoding mode; if you need to handle human-entered error-prone strings, turn on the Base58Check option.
  2. Select Bitcoin, Flickr or a custom character table; if it is a private protocol, first ensure that both parties use the same set of 58 character sequences.
  3. Enter text or upload a file when encoding; paste the Base58 string when decoding, switching to the hexadecimal result to see the raw bytes if necessary.
  4. Copy or download directly after viewing the output; if it is Base58Check, the page will synchronously prompt whether the verification has passed.

Features

  • Standard Base58 and Base58Check dual modes: normal encoding can be done directly, or a 4-byte checksum can be automatically appended or verified.
  • Both text and files can be encoded: ordinary text will be processed according to UTF-8, and files will be encoded according to raw bytes, which is suitable for offline delivery of binary content.
  • Decoding results can be switched between text or hexadecimal: don't get stuck with gibberish when encountering address payloads, hash fragments, or non-UTF-8 data.
  • Supports Bitcoin, Flickr and custom 58-character character table: suitable for compatibility with existing systems or debugging private short code solutions.
  • Browser local processing and result downloading: encoding, decoding, and verification are all completed locally, and the output can be copied or downloaded directly.

How to choose Base58, Base58Check, Base64?

They can both convert bytes into passable text, but the focus is completely different. The key is not "which is more advanced", but whether you value manual transcription and error prevention more, or whether you value compactness and universal compatibility.

Planmore suitableAdvantagesNote
Standard Base58Short logo, manual input, copy and shareRemove easily confused characters to make them easier to identify with the naked eye. It is suitable for strings such as invitation codes, offline codes, and CIDv0.There is no built-in checksum; if automatic error checking is required, Base58Check should be used instead.
Base58CheckAddress, export string, and re-verification after manual transcriptionAdding a 4-byte checksum to Base58 makes it easier to find missing words, typos, and sequence errors.The output will be slightly longer than the standard Base58; it is only responsible for error checking and not responsible for resolving address types or networks.
Base64 / Base64URLInterface transmission, front-end and back-end exchange, when shorter output is requiredThe same data is usually shorter than Base58, more ecologically versatile, and suitable for direct transmission between programs.The characters may contain +, /, =; if you want to put URL, you should use the URL-safe variant instead.Base64 encodingBase64 URL Safe
Base32Not case sensitive, oral delivery, or certain compatible scenariosCharacter sets are more conservative and may be more tolerant of input errors on some systems.The output is usually longer than Base58; if the main requirement is to be shorter and more suitable for short codes, Base58 is often more suitable.Base32 encoding

Best Practices

Priority will be given to Base58Check when manually transcribed or relayed by customer service

As long as the string will be dictated, screenshotted, forwarded in chat, or re-entered manually, a checksum is almost always worth opening. It won't prevent all errors, but it will significantly reduce the "looks like it's right, but is actually missing a character" situations.

When the decoded result is not text, first look at the hexadecimal

Contents such as address payloads, hashes, image headers, and compressed fragments are not guaranteed to be UTF-8. First switch to hexadecimal to confirm the original bytes, and then decide whether to convert the file, continue hashing, or hand it over to other tools for processing.

Hex tools

Do not use Base58 as a long-term storage format for large files

Base58 is more suitable for short strings and small to medium payloads. The larger the file, the longer the output, less convenient to copy, and more likely to be truncated in rich text, chat tools, or logs.

When customizing the character table, it must be synchronized to all production terminals.

As long as one server, script or client uses a different order, the encoding and decoding results will all be misaligned. Fix the 58-character sequence first, and then write it into the protocol or test sample.

Prioritize comparison Base64URL when shorter, more general interface transmission is required.

The advantage of Base58 is that it is easy to read and prevents confusion, but it is not the smallest size. If strings are primarily passed between programs and will not be transcribed by humans, Base64URL is generally more compact and common.

Base64 URL Safe

FAQ

Which one should I choose between Base58 and Base64?

If the string is to be read, copied, or input to others, Base58 is preferred; if it is mainly transmitted in programs, interfaces, JSON or URL parameters, usually Base64 or Base64URL is more compact. The focus of Base58 is readability and anti-obfuscation, not the shortest output.

Base58Check What problem does it solve?

It appends a 4-byte checksum to the original payload, and then encodes the entire payload with Base58. In this way, when the user misses a word, makes a typo, or writes in the wrong order, the tool will more easily report an error in time, instead of quietly getting a string of meaningless results.

Can this page verify Bitcoin addresses?

It can be verified that the Base58Check layer is correct, so it is suitable to check whether there are obvious input errors in the old version of Base58 address or WIF export string. However, it will not further determine the address usage, network type, and script type, nor does it support Bech32 addresses such as `bc1...`.

Why is the code after decoding garbled, or the prompt is not UTF-8?

Because Base58 decodes raw bytes, not necessarily readable text. This can happen with address payloads, hashes, image headers, or arbitrary binary data. Switch to hexadecimal to view the raw bytes, and you can usually continue the analysis.

Is file Base58 encoding and decoding supported?

Support. You can upload files during encoding, and the page will be converted into Base58 according to the original bytes; you can also download the original result back after decoding. The larger the file, the longer the output string, making it more suitable for small to medium workloads or debugging scenarios.

What character tables are supported?

Currently supports the standards Bitcoin Base58, Flickr Base58, and your customized 58-character character table. As long as the encoding end and decoding end use the exact same character sequence, they can communicate with each other.

Can it handle IPFS CID or other on-chain strings?

CIDv0 Such standard Base58btc strings can be directly encoded or decoded; but the page will not continue to parse multibase, multicodec, or concrete on-chain semantics. Bech32 strings like `bc1...` do not fall into the scope of Base58.

Will the uploaded content be sent to the server?

No. Text, files, and Base58Check checksum results are all processed locally in the browser, which is suitable for debugging sensitive loads, offline test data, or file fragments that are inconvenient to upload.

Troubleshooting

Tip contains illegal Base58 characters

The current character table does not accept excluded characters such as 0, O, I, and l. It may also be that you cut the wrong Bitcoin / Flickr / custom character table. First confirm the source of the string, and then check whether the character table is consistent with the other party.

Base58Check verification failed

This usually means that the string was undercopied, the characters were written incorrectly, or it is not Base58Check itself. First confirm whether you really need to open Base58Check, and then go back and check whether the original content is complete.

Custom character table cannot be saved

The custom character table must be exactly 58 characters long, and each character must appear only once. It is recommended to modify the standard Bitcoin character table first to avoid missing characters or repeated characters.

The decoded result is not text

This isn't necessarily a bug. Many Base58 strings originally carry binary payloads. Switch to hexadecimal to view, or download the decoding results as a file, and then decide on the next step.

Glossary

Base58
58-bit text encoding that removes easily confused characters such as 0, O, I, l, etc., suitable for manual input and copy sharing.
Base58Check
A 4-byte checksum is appended after the original payload, and then the entire Base58 encoding is used to detect input errors earlier.
Payload
Do Base58 or Base58Check raw byte content before encoding, which can be text, file bytes, address payload, or arbitrary binary data.
Checksum
Short fingerprints for fast error checking. Base58Check will double SHA-256 on the payload and take the first 4 bytes as the checksum.
Bitcoin Base58 Character table
The most common Base58 character table: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.
Flickr Base58
Flickr is another set of sorting used by Base58, the case order is different from the Bitcoin version, so the same bytes will get different output.

Character table supported by the current page

For the same set of bytes, as long as the character table order is different, the final Base58 output will be different.

character tableCommon usesDescription
Bitcoin Base58Wallet address, CIDv0, common Base58 toolsThe default character table is compatible with most Base58 scenarios.
Flickr Base58Old Flickr short ID scenarioThe case order is different from the Bitcoin version and cannot be mixed.
Custom 58 character tableInternal protocol, short code system, private compatibility layerThe 58 characters must be unique and in the same order at both ends.

When should you switch to hexadecimal viewing?

Base58 The decoded result cannot always be read directly into text.

Content encounteredA better way to viewReason
Address payload/version bytehexadecimalIt's easier to see the prefix, checksum, and fixed byte structures.
Hash fragment / binary test datahexadecimalThese contents are not UTF-8 text to begin with.
Ordinary short text / UTF-8 stringUTF-8 textYou can see the original content directly, and copying is more convenient.
file or compressed fragmenthex or download resultsIt is easier to determine the file header, magic number or subsequent processing path.

Authoritative References