Search for a tool
Base62 Encoding

Tool for encoding / decoding with the Base62 encoding system, using all alphanumeric characters (upper and lower case) forming a base 62.

Results

Base62 Encoding -

Tag(s) : Character Encoding

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Base62 Encoding' tool for free! Thank you!

Base62 Encoding

Base-62 Decoder

 



See also: Base64 Coding — Base 58

Base-62 Encoder



Loading...
(if this message do not disappear, try to refresh this page)
See also: Base64 Coding — Base 58

Answers to Questions (FAQ)

What is Base-62? (Definition)

Base 62 is a positional number system using 62 distinct symbols. It allows for the representation of whole numbers using the 10 digits 0-9, the 26 uppercase letters A-Z, and the 26 lowercase letters a-z.

A commonly used alphabet is: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.

How to encrypt using Base62 cipher?

Base62 encoding involves performing a change of arithmetic base. The principle is as follows:

1 - Interpret the source data as an unsigned integer.

2 - Divide this integer successively by 62.

3 - After each division, keep the remainder (between 0 and 61) and assign it the corresponding character in the Base62 alphabet.

4 - Read the resulting characters in the reverse order of the divisions.

Example: The string dCode, encoded in ASCII as 01100100,01000011,01101111,01100100,01100101, is equivalent to the decimal number $ 430628103269_{(10)} $, which can be converted to base 62 into $ {7, 36, 3, 5, 39, 26, 53}_{(62)} $, or the characters 7a35dQr.

The correspondence between values and symbols depends on the chosen alphabet, which must be known during both encoding and decoding. Generally, the indices of the 62 symbols are:

0 0112233445566778899
10A11B12C13D14E15F16G17H18I19J
20K21L22M23N24O25P26Q27R28S29T
30U31V32W33X34Y35Z36a37b38c39d
40e41f42g43h44i45j46k47l48m49n
50o51p52q53r54s55t56u57v58w59x
60y61z

How to decrypt Base62 cipher?

Decoding a Base62 string involves reconstructing the represented integer and then potentially reinterpreting it as binary data.

The method is as follows: for a Base62 string of length $ n $, denoted $ c_0 c_1 \ldots c_{n-1} $ where $ c_0 $ is the leftmost character

1 - Assign to each character its numeric value $ v(c_i) $ between 0 and 61.

2 - Calculate the decimal value using the formula $$ \sum_{i=0}^{n-1} v(c_i) \times 62^{n-1-i} $$

The resulting number can then be converted to binary and decoded into ASCII or Unicode if necessary.

Example: Decode R0Ow: R equals 27, 0 equals 0, O equals 24, and w equals 58, which is the number $ {27,0,24,58}_{(62)} $, or in decimal $ 6436402_{(10)} $, or in binary $ 11000100011011000110010_{(2)} $, or b62 in ASCII code.

How to recognize a Base62 ciphertext? (Identification)

A Base62 string consists exclusively of the 62 alphanumeric characters: digits 0-9, uppercase letters A-Z, and lowercase letters a-z.

Base62 is case-sensitive: A and a represent distinct values.

It is likely that the distribution of the first few digits decoded can approximately follow Benford's Law.

Fun fact: Base62 is encoded as KixpUr22 and conversely, the string Base62 is equivalent to the number 169958929504, or the binary data 00100111,10010010,01010111,01110100,01100000

Why use Base 62?

Base62 maximizes the use of characters available in most text environments (letters and numbers), allowing data to be represented more compactly than number systems based on smaller bases, such as Base 10 or Basis 16.

Base 62 allows data to be compacted, it is used in URL shorteners (web page addresses), in the generation of unique identifiers in computer systems, etc.

Base 62 is sometimes used to store numbers in character strings.

Source code

dCode retains ownership of the "Base62 Encoding" source code. Any algorithm for the "Base62 Encoding" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Base62 Encoding" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Base62 Encoding" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Base62 Encoding" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).

To cite dCode.fr on another website, use the link: https://www.dcode.fr/base62-encoding

In a scientific article or book, the recommended bibliographic citation is: Base62 Encoding on dCode.fr [online website], retrieved on 2026-03-21, https://www.dcode.fr/base62-encoding

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Base62 Encoding' tool for free! Thank you!


https://www.dcode.fr/base62-encoding
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
â–˛  
Feedback