Base62 Encoder / Decoder
Encode UTF-8 text to Base62 or decode a Base62 value back to text.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Encoded 5 character(s) of UTF-8 text to 7 Base62 character(s).
How it works
- Read the input as UTF-8 bytes.
- Converted the byte sequence to a big integer by repeated long division against base 62.
- Mapped the digits to the 0-9A-Za-z alphabet and preserved leading zero bytes as leading '0' characters.
- Base62 is an encoding, not encryption; it provides no confidentiality.
- The alphabet is case-sensitive, so 'A' and 'a' are different digits.
Methodology
- Encode by interpreting the UTF-8 bytes as a big integer and dividing by 62, mapping each remainder to the 0-9A-Za-z alphabet.
- Preserve leading zero bytes as leading '0' characters so the round trip is exact.
- Decode by reversing the digit mapping and rejecting any character outside the alphabet.
Usage
- Choose encode or decode.
- Paste text to encode, or a Base62 value to decode.
- Read the result; use Copy result to reuse it.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Encode ASCII
{
"mode": "encode",
"value": "hello"
}Encode Unicode
{
"mode": "encode",
"value": "café 🌍"
}Decode a Base62 value
{
"mode": "decode",
"value": "7tQLFHz"
}Limitations
Where Base62 is used
Base62 is common for short identifiers and URL-friendly slugs because every character is alphanumeric and safe in a path. It is not standardised, so treat a value as portable only when the producing and consuming systems agree on the alphabet.
Frequently asked questions
- Is Base62 a standard?
- Base62 is a convention rather than an RFC. It uses the alphanumeric alphabet so the output is safe in URLs, file names and identifiers, but different systems may order the alphabet differently.
- Why is my decoded text wrong after changing case?
- Base62 is case-sensitive: 'a' and 'A' are different digits, so a copied value must keep its exact case.
Sources
- ECMA-262: ECMAScript Language Specification — TC39
- Base62 encoding — Wikipedia — Wikipedia
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.