Number Base Converter
Convert binary, decimal, hex and octal
Integers only — no fractions, scientific notation or thousands separators.
Prefix: 0b
Prefix: 0o
Prefix: 0x
How this conversion works
Assumes standard positional notation with base 2, 8, 10 or 16. All maths runs locally withBigInt — no size limit and no precision loss.
About this tool
This free Number Base Converter translates any number between binary, octal, decimal and hexadecimal — instantly, and all at once. Type a value in any base and see it rendered in every other base simultaneously: enter FF and watch 255 and 11111111 appear, enter a binary string and read its decimal and hex equivalents live. Nothing to install, no account needed; every keystroke converts, right on this page. Number bases are different languages for describing the same quantity. Decimal (base 10) is how humans count — ten digits, place values in powers of ten. Binary (base 2) is how computers think — every value a sequence of bits, because transistors have two states. Hexadecimal (base 16) is the compromise — sixteen digits (0-9 then A-F) that describe binary compactly, since each hex digit maps to exactly four bits: one hex character replaces four binary ones, which is why memory addresses, color codes, hashes and machine-level debugging all speak hex. Octal (base 8) survives in file permissions (chmod 755) and older systems, where each octal digit maps to three bits. Fluency in converting between these is a daily developer skill: reading a color like #FF5733 means parsing hex; debugging a bitmask means thinking in binary; understanding a file permission means reading octal; interpreting a hash or memory address means reading hex fluently. This converter is the training ground and the reference desk for all of it — type a value in whichever base you have, read it in whichever base you need. Everything runs locally in your browser. Conversions are performed entirely by client-side JavaScript — no numbers are uploaded, logged or stored on any server. Disconnect from the internet after the page loads and the converter keeps working.
Frequently asked questions
How do I convert binary to decimal with this tool?+
Paste or type the binary number (only 0s and 1s) into the input and select binary as its base — the decimal value appears instantly alongside hex and octal renderings. For example, 1010 in binary is 10 in decimal, A in hex. The conversion is live: edit the binary digits and watch every base update simultaneously, which makes it a great way to build intuition for how binary place values (1, 2, 4, 8, 16...) accumulate.
How do I convert decimal to binary or hexadecimal?+
Enter the decimal number and the tool displays its binary and hex forms instantly. For example, 255 becomes 11111111 in binary and FF in hex. Watching the conversions live reveals the patterns: every hex digit is exactly four binary digits (F = 1111), which is why hex is the compact notation for binary everywhere from color codes to memory dumps.
Why do programmers use hexadecimal instead of binary?+
Compactness with a perfect mapping. Binary numbers are enormously long — 32 in binary is 10101111 in eight digits, and a 64-bit value needs 64 binary digits. Hex compresses this four-to-one: every hex digit corresponds to exactly four binary bits, so a byte is always two hex characters. Memory addresses, hashes, color codes and byte-level debugging all use hex because it stays short while remaining trivially convertible to the binary underneath.
What are the letters A-F doing in hexadecimal numbers?+
Hex needs sixteen digits but our numerals only provide ten (0-9), so the letters A through F represent the values ten through fifteen. Counting in hex: 8, 9, A (ten), B (eleven)... F (fifteen), then 10 (sixteen). So the hex value FF means 15×16 + 15 = 255 in decimal. Letters in numbers look strange at first, but they are simply digits continuing past nine — nothing more mysterious than that.
What is octal (base 8) and where is it still used?+
Octal uses eight digits (0-7), with each digit mapping to exactly three binary bits. Its surviving stronghold is Unix file permissions: chmod 755 means owner rwx (7 = 111), group r-x (5 = 101), others r-x (5 = 101) — each octal digit is one permission triplet. It appears in some legacy systems and low-level contexts, which is why this converter includes it alongside the more common bases.
How do I know which base a number is in?+
Context conventions help: programming prefixes 0x for hex (0xFF), 0b for binary (0b1010) and 0o for octal (0o17); color codes start with #; and a number containing only 0s and 1s might be binary — or just a small decimal number. When in doubt, try the likely candidates in the converter: the same digits parse to wildly different values in each base, and seeing them side by side usually makes the right interpretation obvious from context.
Does this tool handle negative numbers and large values?+
Yes, within JavaScript's number precision. Negative numbers convert with their sign preserved, and values up to 2^53 - 1 (about 9 quadrillion) convert exactly — beyond that, JavaScript's floating-point representation loses integer precision, and the conversion becomes approximate. For most real-world conversions — color codes, permissions, bitmasks, addresses, IDs — you are far inside the exact range.
Do my numbers get uploaded or stored anywhere?+
No. All conversions happen locally inside your browser using client-side JavaScript — your input never leaves your device, is never transmitted to any server, and is never logged or stored. After the page loads you can disconnect from the internet and the converter keeps working. Numbers converted here are rarely sensitive, but hex values sometimes encode identifiers or addresses you would rather keep on your own machine.