The Number Base Converter on FreeToolZones converts numbers between bases 2 and 36, so a value written in binary, octal, decimal, hexadecimal, or any base in between can be read and used in any other base. Enter a number, choose the base it is written in and the base you want, and the result appears immediately, together with the same value in binary, octal, decimal, hexadecimal, and base 36. Number bases are fundamental to computing: computers store and process binary, programmers read hexadecimal, and older systems used octal, while everyday life runs on decimal. Moving fluently between those representations is a basic skill for anyone who works with code, hardware, or data, and this tool performs the conversion exactly for whole numbers of any size.
The idea of a base is simple once it is stated plainly. In decimal, each digit position is worth ten times the position to its right, and the digits run from 0 to 9. In binary, each position is worth twice the one to its right, and the digits are only 0 and 1. In hexadecimal, each position is worth sixteen times the one to its right, and the digits run from 0 to 9 followed by the letters A to F, standing for 10 to 15. The same quantity can be written in any base: the decimal number 255 is 11111111 in binary, 377 in octal, and FF in hexadecimal. Those are not different numbers; they are different spellings of the same number, and converting between them is a matter of regrouping the same value.
What Is the Number Base Converter?
The Number Base Converter is a free browser-based tool that converts a number from one base to another, for any base from 2 to 36. It runs entirely in your browser, updates live as you type, and needs no account or installation. The default conversion is 255 in decimal to hexadecimal, which gives FF, a familiar example from colour codes and memory addresses.
Bases 2, 8, 10, and 16 are labelled with their common names in the dropdowns: Binary, Octal, Decimal, and Hexadecimal. The other bases are listed simply as Base 3, Base 4, and so on up to Base 36. Digits beyond 9 use letters: A stands for 10, B for 11, and so on up to Z for 35, which is why base 36 is the largest base that can be written with digits and letters alone. The tool accepts both upper and lower case letters, and it displays results in upper case. Negative numbers are supported, with a leading minus sign, and a leading plus sign is also accepted. Fractional numbers are supported too: a number with a decimal point converts its whole part exactly and its fractional part to up to 12 digits in the target base, as the hint on the page explains.
Whole numbers convert exactly, however large. The tool uses exact integer arithmetic for the whole part, so a very long binary number, such as a 64-bit value or a cryptographic-sized integer, converts without the rounding errors that floating-point arithmetic would introduce. That exactness matters for programmers and students working with large values, where a single wrong digit changes the meaning entirely. Fractional parts are a different matter: many fractions that terminate in one base repeat forever in another, just as one third repeats in decimal. The tool limits fractional output to 12 digits, which is a sensible balance between usefulness and readability, and the hint on the page states that limit openly.
The result table shows the converted value in five bases at once: base 2, base 8, base 10, base 16, and base 36. That overview is the fastest way to see a value in all the representations a programmer is likely to need, and it is a useful study aid: entering a decimal number and reading its binary and hexadecimal forms side by side builds the pattern recognition that makes base conversion feel natural over time.
How to Use the Number Base Converter
The converter recalculates on every keystroke and dropdown change. The steps below match the controls on the page.
- Enter a number. Type your number into the Number field, which starts with 255. Use only digits valid in the source base: binary accepts only 0 and 1, decimal accepts 0 to 9, and hexadecimal accepts 0 to 9 and A to F. A single decimal point is allowed for fractional numbers, and a leading minus sign is allowed for negative numbers.
- Choose the From base. Use the From base dropdown to select the base your number is written in, from Base 2 to Base 36. The default is Base 10 (Decimal).
- Choose the To base. Use the To base dropdown to select the base you want the answer in. The default is Base 16 (Hexadecimal). The result updates as soon as either dropdown changes.
- Read the result and the table. The large display shows the conversion as a sentence, such as “255 (base 10) = FF (base 16)”. The table below lists the value in bases 2, 8, 10, 16, and 36. The hint under the Number field reminds you that whole numbers convert exactly and fractional parts are limited to 12 digits.
- Copy the result. Click the Copy result button to copy the main conversion sentence to your clipboard, ready to paste into code, documentation, or homework.
If the field is empty, the tool asks you to enter a number. If a digit is not valid in the selected source base, the tool names the offending digit and the base, for example telling you that a letter is not a valid digit in base 10. That specific feedback makes it easy to find a typo or a wrong base choice. If you use more than one decimal point, the tool asks you to use only one. There is no swap button on this tool; to reverse a conversion, change the two dropdowns, which takes two clicks and recalculates immediately.
Key Features of the Number Base Converter
- Bases 2 to 36. The full range from binary to base 36 covers every base used in computing and mathematics, including the less common bases that appear in puzzles, encoding schemes, and theoretical exercises.
- Named common bases. Binary, Octal, Decimal, and Hexadecimal are labelled by name in the dropdowns, so the most frequently used bases are easy to find among the 35 options.
- Exact whole-number conversion. Whole numbers convert exactly, however large, using exact integer arithmetic. Large binary and hexadecimal values, such as memory addresses and cryptographic numbers, convert without rounding error.
- Fractional support to 12 digits. Numbers with a decimal point convert their fractional part to up to 12 digits in the target base, with the limit stated in the hint on the page.
- Negative numbers supported. A leading minus sign is handled correctly, and a negative zero is normalised to plain zero, so minus zero does not produce a confusing signed result.
- Five-base result table. The table shows the value in binary, octal, decimal, hexadecimal, and base 36 at once, giving programmers the representations they need most in a single view.
- Specific error messages. Invalid digits are named in the error message, so a mistake is easy to locate and fix, rather than producing a silent wrong answer.
- Copy result button. The result sentence copies as plain text, avoiding transcription errors when a long binary or hexadecimal value goes into code or documentation.
- Runs in the browser. No account and no installation, usable on a phone, tablet, or computer.
The exactness for whole numbers is the feature that matters most for serious use. Many simple converters use floating-point arithmetic, which loses precision beyond about 15 decimal digits. A 64-bit address or a long binary string converted that way can come out wrong in its final digits, which is precisely where the error is hardest to spot. This tool’s exact integer handling avoids that failure entirely for whole numbers.
Practical Use Cases for Number Base Conversion
Programming and debugging
Programmers meet hexadecimal constantly: colour codes, memory addresses, error codes, Unicode values, and bit masks are all written in hex. Converting a decimal value such as 255 to FF, or a hex value such as 1F4 back to 500, is a routine step in reading code and debugging output. Binary appears in bit manipulation, flags, and permissions, where each bit represents a yes-or-no option, and converting a flag value between binary and decimal shows exactly which options are set. The five-base table is a quick reference during debugging, when a value must be read in several forms at once.
Computer science study
Number bases are a core topic in computer science education, and students must convert between binary, octal, decimal, and hexadecimal fluently, often by hand in examinations. The tool serves as a checking aid: a student converts a value by hand, enters it in the tool, and confirms the answer, or uses the table to see the pattern across bases for a series of values. Working through the powers of two, 1, 2, 4, 8, 16, 32, 64, 128, and 256, and reading each in binary and hex, builds the intuition that makes later topics such as two’s complement, floating-point representation, and addressing much easier.
Networking and hardware
Network addresses and hardware registers use binary and hexadecimal heavily. An IPv4 address is four decimal numbers, each of which is one byte, and converting those bytes to binary shows the bit structure that subnet masks operate on. A hardware register value read as hexadecimal converts to binary to reveal which individual bits, and therefore which device features, are active. Octal appears in Unix file permissions, where each digit represents three bits covering read, write, and execute for one class of user, so converting an octal permission such as 755 into binary shows the underlying bit pattern directly.
Colour, design, and data encoding
Colour codes in web design are hexadecimal triplets, such as FF0000 for red, where each pair of hex digits is one colour channel from 0 to 255. Converting those pairs to decimal shows the red, green, and blue channel values, and converting decimal channel values back to hex produces the colour code. Data encoding schemes use bases beyond 16: base 32 and base 64 appear in encoded data, and base 36, using digits and all letters, appears in compact identifiers and short codes. The tool’s range to base 36 covers these cases, and the base 36 row of the table shows the most compact digit-and-letter spelling of any value.
Puzzles, games, and mathematics
Number bases appear in puzzles, recreational mathematics, and games that use non-decimal counting. Converting a value into an unfamiliar base, such as base 7 or base 12, and checking the result, is a good exercise in understanding place value itself, rather than memorising decimal habits. The tool’s support for all bases from 2 to 36, with clear error messages for invalid digits, makes it a safe environment for such exploration: an invalid digit is named, not silently ignored, so the rules of each base are reinforced by the feedback.
Tips and Best Practices for Converting Number Bases
- Confirm the source base before entering a number. The same digits mean different values in different bases: 10 is two in binary, eight in octal, ten in decimal, and sixteen in hexadecimal. Set the From base first, then check that every digit is valid in it.
- Read error messages carefully. When the tool names an invalid digit, that digit is either a typo or a sign that the From base is wrong. A number containing the letter F cannot be decimal or octal, so the base choice, not the number, is usually the mistake.
- Group binary digits in fours for hex. Each hex digit corresponds to exactly four binary digits, so grouping a binary number in fours from the right and converting each group gives the hex value directly. The tool does this for you, but the grouping habit helps when reading long binary strings by eye.
- Keep fractional expectations realistic. A fraction that is exact in decimal, such as 0.1, repeats in binary, so the 12-digit fractional output is an approximation. For exact fractional work, convert the numerator and denominator as whole numbers separately.
- Use upper case for hex in documents. The tool displays results in upper case, which is the common convention for hexadecimal in code and documentation. Lower case is equally valid, but consistency within a document avoids confusion.
- Copy long values instead of retyping. A 32-digit binary number retyped by hand will almost certainly contain an error. Use the Copy result button and paste the value where it is needed.
When learning bases, practise with small numbers first and verify each conversion in the table before moving to larger values. The pattern of place values, powers of the base, is the same in every base, and once it is understood for binary and hex, every other base follows the same logic.
Limitations of the Number Base Converter
The Number Base Converter supports bases 2 to 36 and the digit set 0 to 9 plus A to Z. It does not support bases above 36, which would need symbols beyond letters, and it does not support number prefixes such as 0x for hex or 0b for binary: enter the digits alone, without a prefix, and the tool will reject a prefix character as an invalid digit. Fractional parts are limited to 12 digits in the target base, so repeating fractions are truncated, not rounded to an exact representation. The tool converts the value as a pure number; it does not interpret two’s complement, floating-point bit patterns, or signed magnitude encodings, which are ways of representing negative numbers and fractions in fixed-width hardware and need their own treatment. The result table shows five bases only, although any base from 2 to 36 can be selected as the target for the main result.
Frequently Asked Questions About the Number Base Converter
How do I convert decimal 255 to hexadecimal?
Enter 255, choose Base 10 (Decimal) as the From base and Base 16 (Hexadecimal) as the To base. The result is FF, because 255 is 15 times 16 plus 15, and 15 is represented by F. The table also shows 255 as 11111111 in binary, 377 in octal, and 73 in base 36. This is the tool’s default example, so it appears as soon as the page loads.
What digits are valid in each base?
In base N, the valid digits are 0 up to N minus 1, using letters after 9: A is 10, B is 11, and so on to Z is 35. Binary accepts only 0 and 1, octal accepts 0 to 7, decimal accepts 0 to 9, and hexadecimal accepts 0 to 9 and A to F. If you enter a digit that is too large for the selected base, the tool names the digit and the base in its error message.
Can the tool convert very large numbers exactly?
Yes, for whole numbers. The tool uses exact integer arithmetic for the whole part, so numbers with dozens or hundreds of digits convert without the rounding errors that floating-point arithmetic would cause. Fractional parts are converted separately and limited to 12 digits, so a fraction that repeats in the target base will be truncated at 12 digits, as the hint on the page explains.
Why does 0.1 in decimal become a repeating fraction in binary?
A fraction terminates in a given base only when its denominator, in lowest terms, divides a power of that base. One tenth has a denominator of 10, which is 2 times 5, and 5 does not divide any power of 2, so 0.1 cannot terminate in binary. It repeats forever, just as one third repeats in decimal. The tool shows the first 12 digits of the binary expansion, which is an approximation, and the same limitation applies to any converter.
What is base 36 used for?
Base 36 uses all ten digits and all 26 letters, making it the most compact base that can be written with ordinary alphanumeric characters. It appears in short identifiers, compact codes, and URL shorteners, where a large number must be written as briefly as possible using characters that are safe in text. The tool’s table includes a base 36 row, so any value can be seen in its most compact alphanumeric form.
Related Tools
Number bases connect closely to encoding and computing tools. The Text to Binary Converter and Binary to Text Converter work with binary representations of text, the HEX to RGB Converter uses hexadecimal colour codes, and the Scientific Calculator handles arithmetic in decimal. The Number Rounding Tool helps present converted values tidily. You can find every tool from the FreeToolZones home page.