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

Processed entirely in your browser; nothing is uploaded.

Result
7tQLFHz

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

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

  1. 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.
  2. Preserve leading zero bytes as leading '0' characters so the round trip is exact.
  3. Decode by reversing the digit mapping and rejecting any character outside the alphabet.

Usage

  1. Choose encode or decode.
  2. Paste text to encode, or a Base62 value to decode.
  3. 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

jsonSelect to copy
{
  "mode": "encode",
  "value": "hello"
}

Encode Unicode

jsonSelect to copy
{
  "mode": "encode",
  "value": "café 🌍"
}

Decode a Base62 value

jsonSelect to copy
{
  "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

  1. ECMA-262: ECMAScript Language Specification — TC39
  2. Base62 encoding — Wikipedia — Wikipedia