Skip to tool

Base62 Encoder and Decoder

Encode bytes as whole-value Base62, or decode Base62 text back to bytes. Choose either supported digit and letter ordering.

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.

Result

Results appear here.

About this tool

On this page

What is Base62?

Base62 writes bytes using only the digits and the upper- and lowercase letters, 62 characters in all. The output has no punctuation, so it drops into URLs, file names and identifiers without escaping. Unlike Base64 there is no standard, and implementations disagree on the alphabet order.

Base62 options

Operation
Encode (the default) or Decode.
Input
Text or a file to encode, or Base62 text to decode.
  • Alphabet: 0-9 A-Z a-z (the default) or 0-9 a-z A-Z. Use the same ordering for encoding and decoding.
  • The whole input is converted as one value, and leading zero bytes are preserved.
  • Input is limited to 1 MiB of decoded data and 3 MiB of encoded text.

Why use Base62 instead of Base64

Base64 needs two symbols beyond letters and digits, + and / in the standard alphabet. Both mean something in URLs and file paths, so Base64 values get escaped or switched to a URL-safe variant. Base62 avoids the question by using no symbols at all, which is why short-link services and ID generators often use it.

The cost is a little length. Each Base62 character carries just under 6 bits, against exactly 6 for Base64, so the output is slightly longer.

Base62 alternatives

Base64 is standardized in RFC 4648 and handles large data well. Base58 also avoids symbols and drops look-alike characters too, at a small cost in length. Hex is longer still and needs no alphabet agreement at all.

Things to know about Base62

Because the input is converted as one large number rather than in blocks, conversion gets slower as the input grows, which is why this tool stops at 1 MiB. For bigger payloads, Base64 is the practical choice.

Warning

Confirm the alphabet ordering the receiving system expects. Decoding with the other ordering does not fail; it returns different bytes. And like any encoding, Base62 hides nothing from anyone who decodes it.

Browse

Find similar tools by category or tag.