How to use the Number Base Converter
Convert between any two bases in three steps:
1
Set the source base and enter the number
Click a quick-base button (2, 8, 10, 16, 32, 36) or type any base from 2 to 36 in the custom input. Enter the number in that base — the toolbar shows which characters are valid for the chosen base.
2
Set the target base
Choose the output base using the same quick-base buttons or custom input in the 'To base' row. The primary result panel updates instantly.
3
Use the all-bases table
The table below shows the value in all common bases (or all 35 bases with the 'Show all bases' toggle). Click any row to copy that representation. Use Swap to reverse the conversion direction.
When to use this tool
Use when you need to convert between non-standard bases or see a number in all bases simultaneously:
- →Converting between binary, decimal, hex, and octal simultaneously to compare representations of the same value side by side
- →Converting to or from base 32 or base 36 for compact human-readable identifiers used in URL shorteners or ID systems
- →Converting numbers to base 36 (digits 0–9 and A–Z) which is the most compact case-insensitive alphanumeric encoding
- →Exploring base conversion concepts in computer science courses by seeing a number expressed in all bases at once
- →Converting between bases used by specific computing systems: base 3 (ternary logic), base 4, base 12 (duodecimal), base 20 (Mayan)
- →Generating compact ID strings by converting large integer IDs from decimal to base 32 or base 36 for use in URLs or APIs
Frequently asked questions
Q:What bases does the converter support?
The converter supports every integer base from 2 (binary) to 36 (hexatrigesimal). Base 36 uses all ten digits (0–9) and all 26 letters (A–Z), which is the maximum base achievable with standard alphanumeric characters. Bases 2, 8, 10, and 16 are the most common in computing. Base 32 is used in Crockford encoding and some ID systems. Base 36 is used by URL shorteners, UUID variants, and compact ID generators because it produces the shortest case-insensitive alphanumeric strings.
Q:What digits are valid for each base?
A base-N number can only use the first N characters of the sequence 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ. Base 2 uses only 0–1, base 8 uses 0–7, base 10 uses 0–9, base 16 uses 0–9 and A–F, base 36 uses 0–9 and A–Z. The toolbar in the converter shows the full set of valid characters for the currently selected source base, so you always know what to type. Input is case-insensitive — lowercase letters are normalised to uppercase.
Q:How does the Swap button work?
The Swap button exchanges the From and To base settings and simultaneously places the current conversion result into the input field. So if you have converted binary 1010 (base 2) to decimal (result: 10), clicking Swap sets the input to '10', the From base to 10 (decimal), and the To base to 2 (binary) — giving you the reverse conversion in one click. This is useful for verifying round-trip conversions (encode then decode to confirm you get back the original value).
Q:Why does the all-bases table show the value in all 35 bases simultaneously?
Seeing a number in all bases at once is useful for learning — you can observe patterns, such as how powers of 2 appear in binary (100, 1000, 10000), octal (2, 4, 10, 20), and hex (2, 4, 8, 10, 20). It is also practical when you need to find the most compact representation for a given ID or value — scanning the table shows which base produces the shortest string. The 4 common bases (2, 8, 10, 16) are shown by default; toggle 'Show all bases 2–36' for the complete table.
Q:What is base 36 and when is it useful?
Base 36 uses the 36 characters 0–9 and A–Z. It is the most compact base that can be represented with standard unambiguous alphanumeric characters (no symbols, no case sensitivity). A large decimal number like 1,000,000 converts to base 36 as 'LFLS' — dramatically shorter. Base 36 is used by URL shorteners to create compact links, by some database ID systems (KSUID, Nano ID variants), and by encoding timestamps or hash values for human-readable identifiers. It produces shorter strings than hexadecimal (base 16) while remaining case-insensitive.
Q:Does the converter handle arbitrarily large numbers?
Yes — the converter uses JavaScript BigInt throughout the conversion pipeline, from parsing the source base to generating the output in every target base. BigInt supports integers of arbitrary size without any precision loss. You can convert a 100-digit binary number, a 50-digit decimal number, or a long base-36 ID without overflow or rounding errors. The only practical limit is the browser's available memory and rendering capacity for very long output strings in the all-bases table.