Skip to content
Number → Binary, Octal, Decimal, HexDeveloper tools

Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal. Type in any base and see all four at once, each with its own copy button.

About this tool

About Number Base Converter

This number base converter shows the same whole number in the four bases programmers and students use most: binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Pick the base you are typing in, enter the number, and all four results appear at once as you type, each with a copy button. So decimal 255 shows as 11111111 in binary, 377 in octal and FF in hexadecimal; type FF with Hexadecimal selected and you get 255 back. Hexadecimal letters can be typed in upper or lower case, and results are shown in capitals. A small reminder of how bases work: each position in a number is worth the base times the position to its right. In binary the positions are worth 1, 2, 4, 8, 16 and so on, so 1011 is 8 + 2 + 1 = 11. In hexadecimal the digits run 0–9 then A–F for 10 to 15, and each position is worth 16 times the next, so 2F is 2 × 16 + 15 = 47. One hex digit equals exactly four binary digits, which is why hex is used as a short way to write bytes, colours (#FF8800), memory addresses and file signatures, while octal survives mainly in Unix file permissions such as chmod 755. The converter is built for whole numbers and works in your browser. Some limits are worth knowing. It reads the number from the left until it meets a character that is not valid in the chosen base and ignores the rest, so check your input if a result looks short (typing 129 as binary gives 1). Do not type the 0b or 0o prefix; a leading 0x in hexadecimal is accepted. Fractions are not converted — the part after a decimal point is dropped — and negative numbers are shown with a minus sign rather than in two’s-complement form. Results are exact up to 9,007,199,254,740,991 (2⁵³ − 1); larger numbers lose precision.

Number Base Converter tool

Who converts number bases

From homework to hardware

Computer science homework

Check base conversions for exams like GATE or class assignments.

ExampleConfirm that 156 decimal is 10011100 in binary.

Colour codes

Each pair in a hex colour is a 0–255 value.

Example#FF8800 → FF = 255, 88 = 136, 00 = 0 for red, green, blue.

Unix permissions

chmod uses octal digits for read, write and execute.

Example755 octal is 111 101 101: rwx for owner, r-x for others.

Bit flags and masks

See which bits a flag value sets.

ExampleDecimal 12 is 1100: bits 2 and 3 are on.

Memory and addresses

Debuggers and logs show addresses and error codes in hex.

ExampleConvert 0x1F4 to decimal 500 to read a log value.

Networking

Subnet masks and MAC addresses are binary and hex underneath.

Example255 decimal = 11111111, one full octet of a mask.

Conversion tips

Avoid the common slips

Check for stray characters

Reading stops at the first invalid digit, so 1021 in binary reads as 10 (2). If a result looks short, check the input base.

Group binary in fours

Split binary into groups of four from the right; each group is one hex digit. 1010 1111 = AF.

Skip 0b and 0o

Type binary and octal without the 0b or 0o prefix. The 0x prefix for hex is fine.

Whole numbers only

Digits after a decimal point are dropped. Convert the whole part only.

Converting colours?

For HEX to RGB, HSL or CMYK, use the colour converter.

Open Color Converter

Unix time in hex?

Convert the number to decimal, then read it as a date.

Open Unix Timestamp Converter
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed Number Base Converter and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 22 November 2026

Answers and guidanceFrequently Asked Questions
How do I convert decimal to binary?
Select Decimal and type the number; the binary result appears at once. By hand, divide by 2 repeatedly and read the remainders from bottom to top.
How do I convert hex to decimal?
Select Hexadecimal and type the hex number (with or without 0x). The decimal value appears straight away.
Can I convert negative numbers?
Yes, they are shown with a minus sign, such as -1010 for -10. The tool does not show two’s-complement form.
Does it convert fractions like 10.5?
No. It converts whole numbers; anything after the decimal point is ignored.
Why is my result shorter than expected?
The number is read until the first character that is not valid for the chosen base. Check that you selected the right input base.
What is the largest number it handles exactly?
9,007,199,254,740,991 (2⁵³ − 1). Bigger numbers are converted but may lose precision in the last digits.
Why does octal still matter?
Mainly for Unix and Linux file permissions (chmod 644, 755) and some older systems; each octal digit is exactly three bits.
More tools for your workflowRelated Tools

Color Converter

Convert colours between HEX, RGB, HSL, HSV, CMYK and CSS names, with transparency, sliders, a contrast check and tints and shades.

Unix Timestamp Converter

Convert a Unix timestamp to a date in your time zone, UTC and IST, and a date back to a timestamp. Seconds, milliseconds, microseconds and nanoseconds detected.

Hash Generator (MD5, SHA-256, SHA-512)

Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text or file at once, and check a file against the hash a website gives you.

Base64 Encode/Decode

Encode text or files to Base64 and decode Base64 back to text, images or files. UTF-8 safe, URL-safe option, data URIs, all in your browser.

1 / 3
Browse all developer tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.