Home Tools Blog About

Convert Any Base: Arbitrary Base Conversion Guide

Arbitrary base conversion lets you write a number in any base you choose, not just the common 2, 8, 10, and 16. Base 5, base 36, even unusual bases all follow the same place-value rule, just with a different number of digits per column. This guide explains how any base works, how to convert text and numbers to a custom base, and a free tool that handles bases the standard converters skip.

The one rule behind every base

Every positional base works the same way: each column is worth the base raised to a power, counting from zero on the right. In base 10 the columns are 1, 10, 100. In base 5 they are 1, 5, 25. To read a number you multiply each digit by its column value and add. That single rule covers base 2, base 16, and base 37 alike, as our number systems guide shows for the common bases.

Digits beyond 9

A base needs as many distinct digits as its size. Base 10 uses 0 to 9. Base 16 borrows letters, A to F, for the values past 9. Higher bases keep going through the alphabet, so base 36 uses 0 to 9 then A to Z, giving 36 symbols. This is exactly how short codes and IDs pack large numbers into few characters.

Convert to an arbitrary base

To convert a value into base N, divide by N repeatedly and read the remainders from last to first, mapping any remainder above 9 to a letter. Doing this by hand for an unusual base is slow and error prone, so the ASCII to arbitrary base converter lets you pick the base and does the math, while the arbitrary base to ASCII converter brings it back.

Encoding text in a custom base

Because each character has a numeric code, you can encode whole strings in a chosen base. This is the idea behind compact encodings: representing bytes in a larger base produces shorter, link-safe strings. Base 64 and base 58 are the famous examples, covered in our base encoding guide, and an arbitrary base tool lets you experiment with bases between and beyond them.

Why custom bases are useful

Custom bases show up wherever numbers need to be short or human-friendly. Base 36 and base 62 shorten IDs and URLs. Base 58 drops easily confused characters for wallet addresses. Some puzzles and ciphers rely on unusual bases. Beyond the practical uses, working in an arbitrary base is the clearest way to prove to yourself that base 10 is just a habit, not a rule of math.

Free converters used in this guide

Frequently asked questions

What is an arbitrary base?

Any number base you choose, such as base 5 or base 36, rather than only the common 2, 8, 10, and 16. They all follow the same place-value rule.

How does base 36 represent values past 9?

It uses letters after the digits, so 0 to 9 then A to Z, giving 36 symbols and letting large numbers fit in few characters.

How do I convert a number to a custom base?

Divide by the base repeatedly and read the remainders from last to first, turning any remainder above 9 into the matching letter. A converter does this for any base.

Why use a base other than 10 or 16?

To shorten IDs and URLs, to drop confusing characters, or to study how positional systems work. Base 36 and base 62 are common for short codes.

Is base 64 an arbitrary base?

It is a specific high base with its own alphabet, but it follows the same principle, so an arbitrary base tool helps you understand and experiment around it.

ATV

Written by Nick (ATV Team)

We build and maintain the 600+ free, client-side tools on this site, and every guide is written against the tools themselves: each figure is computed and checked before it is published, and every linked tool is tested in the browser. More about how we work on the about page, and the full library of guides lives on the blog.