Logo

MonoCalc

/

Base62 Decoder

Encode/Decode
Paste your Base62-encoded string here.

About This Tool

🔓 Base62 Decoder – Convert Base62 Strings Back to Text, Numbers & Hex

Base62 decoding reverses the Base62 encoding process, converting compact alphanumeric tokens back into their original form — plain text, large integers, or raw byte sequences. Because Base62 uses only the 62 URL-safe characters 0–9, A–Z, and a–z, it is widely used for URL shorteners, session tokens, distributed database IDs, and referral codes.

How Base62 Decoding Works

A Base62 string is essentially a number written in base 62. Each character has a positional value determined by its index in the alphabet. The decoder computes:

decoded_int = Σ (alphabet.indexOf(char[i]) × 62^(n-1-i))  for i = 0 to n-1

The resulting integer is then interpreted as a sequence of bytes (big-endian), which are decoded as UTF-8 text, kept as a decimal number, or displayed as a hexadecimal string depending on the selected output mode. JavaScript's native BigInt is used throughout to prevent overflow on tokens of any length.

Alphabet Variants

The mapping between characters and values depends entirely on the alphabet used during encoding. Three variants are supported:

VariantAlphabet OrderCommon Use
Standard0-9 A-Z a-zMost encoders, URL shorteners
Inverted (Flickr)0-9 a-z A-ZFlickr short URLs, some ID systems
CustomAny 62 unique charactersProprietary or obfuscated token schemes

Output Modes

Choose how the decoded bytes should be presented:

  • Text (UTF-8) — Interprets the bytes as a human-readable string. Best for encoded short messages, usernames, or slugs.
  • Integer (Decimal) — Returns the raw numeric value as a decimal string. Ideal for distributed IDs, Snowflake tokens, and numeric database keys.
  • Hex — Displays the decoded bytes as a lowercase hexadecimal string, useful for inspecting binary payloads or verifying cryptographic tokens.
  • Binary — Shows decoded bytes as space-separated 8-bit groups for low-level analysis.

Batch Decoding

Enter multiple Base62 tokens (one per line) to decode them all at once. Each line is validated and decoded independently — invalid tokens display an error for that row without stopping the rest of the batch. Results appear in a table with the row number, input token, decoded output, and status.

Round-Trip Verification

The tool automatically re-encodes the decoded result and compares it to your original input. A ✓ Match badge confirms that the decoding was lossless; a ✗ Mismatch badge indicates a potential alphabet mismatch or data loss during encoding.

Common Use Cases

  • Decoding YouTube video IDs and short URL tokens back to numeric IDs
  • Inspecting session tokens, CSRF tokens, and referral codes
  • Reversing compact database primary keys from Base62 back to integers
  • Verifying round-trip integrity of a custom Base62 encoding pipeline
  • Processing bulk token exports in batch mode

Tips for Accurate Decoding

  • Always use the same alphabet that was used during encoding — a single character order mismatch will produce completely wrong output.
  • If the decoded text looks like garbage, try switching output mode to Integer or Hex.
  • Leading 0 characters in Base62 (the first character of the alphabet) represent leading zero bytes — they are significant and preserved by this decoder.
  • For very large numeric IDs, make sure to copy the full decoded integer — browser JavaScript numbers cap at 53-bit precision, but this tool uses BigInt internally.

Frequently Asked Questions

Is the Base62 Decoder free?

Yes, Base62 Decoder is totally free :)

Can I use the Base62 Decoder offline?

Yes, you can install the webapp as PWA.

Is it safe to use Base62 Decoder?

Yes, any data related to Base62 Decoder only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is Base62 decoding?

Base62 decoding converts a compact alphanumeric string (using characters 0–9, A–Z, a–z) back into its original data — text, a large integer, or raw bytes. It is the reverse of Base62 encoding.

How does this Base62 decoder work?

The decoder treats each character in the Base62 string as a digit in base 62. It multiplies each character's position value by 62 raised to the appropriate power, sums the results into a BigInt, then converts the integer to bytes and interprets them as UTF-8 text, a decimal number, or a hex string depending on your chosen output mode.

What alphabet variants does this decoder support?

It supports the Standard alphabet (0-9A-Za-z), the Inverted / Flickr-style alphabet (0-9a-zA-Z), and fully custom 62-character alphabets. The alphabet used to decode must exactly match the one used during encoding.

Can it decode tokens created by URL shorteners or ID generators?

Yes. Most URL shorteners and distributed ID systems (such as YouTube video IDs, Snowflake-style IDs, and database primary keys) use Base62 with the standard alphabet. Paste the token and select the matching output mode (Text or Number).

Why does my decoded output appear as garbled text?

This usually means the original data was not UTF-8 text — it was a number or raw binary. Try switching the output mode to Number or Hex to see the correct representation. Also verify you are using the same alphabet variant that was used during encoding.

What are the accuracy and limitations of this tool?

The decoder uses JavaScript's native BigInt for arbitrary-precision arithmetic, so it handles tokens of any practical length without overflow. Very long inputs (thousands of characters) may take a moment to process. Custom alphabets must be exactly 62 unique characters.