Base62 Encoder / Decoder
Encode bytes or large integers to Base62 and decode them back.
Mode: Bytes · Encode · Alphabet: 0-9A-Za-z
Related Tools
How to use
- 1.Choose Bytes or Integer, then Encode or Decode, and pick an alphabet.
- 2.In Bytes mode, encode UTF-8 text, hex bytes or a file of up to 4,096 bytes; decoding shows hex, UTF-8, Base64 and a byte array.
- 3.In Integer mode, encode a decimal number or a hex number with an optional 0x prefix; decoding shows decimal and hexadecimal.
- 4.A custom alphabet needs exactly 62 unique single printable symbols.
- 5.Swap moves a result back into the input, and integer input is limited to 100,000 characters to keep the page responsive.
Base62 Encoder / Decoder
Base62 writes data with 62 symbols: the digits 0–9 and the letters A–Z and a–z. It is not a formal standard, and systems disagree in two ways. First, alphabet order: 0-9A-Za-z and 0-9a-zA-Z produce different text for the same data, and decoding with the wrong order gives a different result without any error. Second, what is encoded: Bytes mode treats the input as a byte sequence and turns each leading zero byte into one leading alphabet[0] symbol (00 → 0, 0000 → 00, 000001 → 001), while Integer mode treats the input as one number, so leading zeros carry no value and the output is the shortest form (0 → 0, 61 → z, 62 → 10). Integer mode uses BigInt, so values far above Number.MAX_SAFE_INTEGER stay exact.
Privacy
Processing stays in your browser. Text, files, integers and alphabets are never uploaded or saved. Base62 is not standardized. Use the same alphabet and mode when decoding data produced by another system.
Frequently asked questions
- Is Base62 a standard encoding?
- No. Systems differ in alphabet order and in whether they encode bytes or a single integer, so decode with the same alphabet and mode that produced the data.
- Are leading zero bytes preserved?
- In Bytes mode, yes: each leading zero byte becomes one leading alphabet[0] symbol, so 00 encodes to 0 and 000001 to 001 with the 0-9A-Za-z alphabet. In Integer mode leading zeros carry no value.
