Number Base Converter
Convert a number between binary, octal, decimal, and hexadecimal.
Useful when reading memory addresses, decoding bit flags, working with colour values, or debugging anything that shows numbers in a base other than ten.
This tool runs entirely in your browser
This tool runs entirely in your browser. The data you paste is processed on your device and never sent to Filorra.
That is not a small detail for developer tools. API responses, tokens, config files, and log excerpts routinely contain credentials and customer data, and pasting them into a server-side tool means disclosing them to a third party.
How to use Number Base Converter
Enter your number
Type it in and indicate which base it is currently in.
Read the conversions
The equivalents in the other bases are shown together.
Copy what you need
All conversion happens locally.
Why hexadecimal is everywhere in computing
Hex is not an arbitrary convention — it fits the underlying structure of a byte exactly, which is why it appears wherever raw data is displayed.
One hex digit represents exactly four bits, so a byte is always precisely two hex digits. Conversion between binary and hex requires no arithmetic: split the bits into groups of four and translate each group independently. That correspondence does not exist for decimal, where a byte spans one to three digits with no clean relationship to the bits.
This is why memory addresses, colour codes, hashes, MAC addresses, and byte dumps are all written in hex. `#FF8000` is immediately readable as three bytes — full red, half green, no blue — and the decimal equivalent, 16744448, tells you nothing at a glance.
Reading bit flags
Binary conversion earns its keep when a system packs several boolean settings into one integer.
Each bit is an independent flag. A permissions value of 6 is `110` in binary, which is read as: bit 2 set, bit 1 set, bit 0 clear. Against the Unix convention of read=4, write=2, execute=1, that is read and write but not execute.
When an API returns a status or capability integer that seems meaningless, converting it to binary and checking which bits are set is usually the fastest way to interpret it. The same applies to bitmask parameters, where you combine options by adding their values.
Octal is mostly a legacy of Unix permissions
Base 8 was widely used on early computers whose word sizes were multiples of three bits, which made octal as convenient then as hex is now.
Modern machines are built around 8-bit bytes, so hex fits better and octal has largely disappeared — with one prominent survivor. Unix file permissions are octal because they group naturally into three sets of three bits: owner, group, and others, each with read, write, and execute.
That is why `chmod 755` is written the way it is. Each digit is one three-bit group: 7 is `111`, all three permissions; 5 is `101`, read and execute but not write.
When to use Number Base Converter
- Interpreting a bit flag value returned by an API.
- Converting a hex colour component to decimal.
- Reading a memory address or byte dump while debugging.
- Working out the octal value for a Unix permission set.
Common problems
- My hex value is not accepted.
- Remove the prefix — 0x, #, or a trailing h — and enter the digits alone.
- Large numbers lose precision.
- JavaScript numbers are exact only up to 2^53. Beyond that, use a tool with arbitrary-precision support.
- How do I convert a negative number?
- It depends on the representation. Two's complement encoding depends on the word width, so specify whether you mean 8, 16, 32, or 64 bits.
- My binary has a different number of digits than expected.
- Leading zeros are dropped. Pad to the width you need — 8, 16, or 32 bits — when the field width matters.
Frequently asked questions
- Is my data sent anywhere?
- No. Conversion happens entirely in your browser.
- Why is hexadecimal used so widely?
- One hex digit is exactly four bits, so a byte is always two digits. That makes conversion to and from binary trivial, which decimal does not offer.
- What is octal still used for?
- Mainly Unix file permissions, where three-bit groups map cleanly onto owner, group, and other permission sets.
- How do I read a bit flag value?
- Convert it to binary and check which positions are set. Each bit is an independent option.