Skip to main content

Base62 Encoder / Decoder

New

Encode and decode data using Base62 — ideal for URL-safe short IDs.

base62encodedecodeshort-id
Read the guide
Shortcuts:⌘ KSearch

Base62 uses digits, uppercase, and lowercase letters for compact URL-safe identifiers and numeric short codes.

Alphabet: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

Frequently Asked Questions

Why does encoding '12345' treat it like a number instead of plain text?

In encode mode, an all-digit input is treated as a decimal BigInt, not as UTF-8 text bytes. That means '12345' and '0012345' are interpreted numerically, which can change reversibility if those leading zeroes mattered to you.

Which Base62 alphabet does this use?

It uses exactly '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'. If another system uses a different character order, the same value can encode to a different string.

Why does the decoded text field say N/A?

Because the Base62 value always maps to a number, but that number doesn't always decode cleanly to valid UTF-8 bytes. When TextDecoder rejects the byte sequence, the tool leaves the text interpretation as 'N/A'.

Can I preserve leading zeroes when round-tripping a number?

Not in the numeric path. Pure-digit input is converted to an integer first, so formatting like leading zeroes is lost. If you need exact textual preservation, enter a non-numeric text payload instead of an all-digit string.

What outputs do I get when it succeeds?

You get three synchronized views: the Base62 string, the decimal BigInt value, and a UTF-8 text interpretation when available. That makes it useful for both short-ID math and text experimentation.

Related Tools