Base62 Encoder/Decoder

Encode hex to Base62 (0-9a-zA-Z) for URL-safe compact identifiers, or decode Base62 strings back to hex.

Enter hexadecimal bytes to encode to Base62.

How to Use

  1. Choose a mode — Select Encode (hex → Base62) or Decode (Base62 → hex) using the tabs.
  2. Enter data — Type or paste hex (for encode) or Base62 (for decode) in the input field.
  3. View results — The converted output appears in real-time with byte length and character length information.

All conversion is performed 100% client-side in your browser. No data is sent to any server.

What Is Base62?

Base62 is a compact encoding scheme that uses 62 alphanumeric characters (0-9, a-z, A-Z) to represent large numbers in a URL-safe format. Unlike Base64, it does not include +, /, or = characters, making it ideal for use in URLs, short URLs, and compact identifiers without requiring escaping.

0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

Base62 encoding is commonly used for URL shorteners (e.g., bit.ly/abc123), short unique IDs, invite codes, coupon codes, and any application requiring compact, human-friendly, URL-safe identifiers.

Base62 vs Other Encodings

Encoding Characters URL-Safe Use Case
Base16 (Hex)16YesLowest density, readable
Base3232YesCase-insensitive, readable
Base3636YesLowercase only, shorter
Base5858YesCrypto addresses (no ambig)
Base6262YesCompact and case-sensitive
Base6464 + paddingNo (needs escape)Maximum density, data URIs

Frequently Asked Questions

What is Base62 used for?

Base62 is commonly used for URL shorteners, unique ID generation, coupon codes, invite codes, and anywhere you need a compact, URL-safe representation of binary data without special characters.

How does Base62 differ from Base64?

Base62 uses only alphanumeric characters (A-Z, a-z, 0-9) and has no padding, making it inherently URL-safe. Base64 uses +, /, and = characters which must be percent-encoded in URLs, reducing the benefit of the encoding.

Is Base62 more compact than Base64?

No. Base64 encodes 6 bits per character (64 = 2^6), while Base62 encodes approximately 5.95 bits per character (62 ≈ 2^5.95). Base64 produces slightly shorter output, but requires URL-encoding or additional handling for web use. Base62 is slightly longer but directly URL-safe.

Can I use Base62 for short IDs?

Yes. Base62 is excellent for generating short IDs from numeric values. For example, the number 1000000 encodes to 4c92 in Base62 — much shorter than decimal (1000000) or hex (f4240).

Related Tools