Developer tools
Practical guide: Number Base Converter
Use Number Base Converter when you need a quick way to work through this task. Convert numbers between binary, octal, decimal and hexadecimal. This guide walks through a small example and the checks to make before you use the result.
Developers often encounter hexadecimal colour values, binary flags and octal permissions. Converting the notation makes these values easier to compare without changing their meaning.
How to use the tool
- Open the tool and start with the worked example below.
- Enter a number in any of the four bases; the other three update automatically.
- Verify the result against the example before using it in your project.
Try a small example
Example input or settings
Decimal 255 = binary 11111111 = octal 377 = hexadecimal FF.
What to check
Enter decimal 255. Expect binary 11111111, octal 377 and hex FF. Convert back; check that every digit is valid for its base.
Does changing base change the value?
No. Binary, octal, decimal and hexadecimal use 2, 8, 10 and 16 distinct digits respectively to represent numbers.
When this is useful
For a real task, replace the sample with your own input and check the output in its final context. Keep a copy of the original if the change is hard to reverse.
Before you rely on the result
Validate the output in your own environment. Formatting or conversion does not prove that data or code is safe or correct.