Ttooleras
🔢

Number Base Converter

Converters

Convert numbers between binary, octal, decimal, hexadecimal, and any base from 2 to 36 with clear step-by-step output.. Free, private — all processing in your browser.

DecHexOctBin
Advertisement

Enter a number, tell it which base that number is in (binary, octal, decimal, or hex), and see it in every base at once — binary, octal, decimal, hexadecimal, plus base 32 and base 36. It also shows how many bits and bytes the value needs and whether it fits in an 8-, 16-, or 32-bit unsigned integer, which is the practical question when you're packing values into fixed-width fields or registers.

There's a click-to-load table of common values (0, 255, 1024, 65535…) for quick reference. Everything computes in your browser.

Using the Number Base Converter

  1. 1

    Enter a number in any base

    Type or paste your value into the field labeled with the source base. Case does not matter for hex or base 36 letters.

  2. 2

    Watch other bases update

    Binary, octal, decimal, hex, and base 36 fields recalculate instantly as you type, so you can read the equivalent value in every common system.

  3. 3

    Optional — pick a custom base

    If you need a base outside the common five (say base 12 or base 20), enter the target base in the custom field.

  4. 4

    Toggle working

    Turn on the step-by-step panel to see the division-and-remainder or multiplication process behind the conversion.

  5. 5

    Copy or share

    Copy any field value to the clipboard with one click, or share the URL so a colleague sees the exact same inputs and results.

Number Base Converter — examples

Decimal 255 in all bases

The maximum value of one byte, shown in every common base.

Input
255 (decimal)
Output
binary: 11111111
octal: 377
hex: FF
base 36: 73

Hex to decimal

Converting a CSS color channel to decimal for RGB calculations.

Input
FF6B35 (hex)
Output
decimal: 16738613
binary: 1111 1111 0110 1011 0011 0101
red: 255, green: 107, blue: 53

Octal Unix permissions

Converting chmod 755 into its binary permission bits.

Input
755 (octal)
Output
binary: 111 101 101
meaning: rwx r-x r-x (owner, group, others)

Large cryptographic value

A 256-bit hex value converted to decimal exactly using BigInt.

Input
0x2A7B4F8E1C9D6B3A (hex, 64-bit)
Output
decimal: 3061194175486451002
binary: 64 bits with no precision loss

Fractional decimal

Converting 0.1 decimal to binary shows why floating-point arithmetic is imprecise.

Input
0.1 (decimal)
Output
binary: 0.00011001100110011... (repeating)
marked as approximate due to infinite expansion

What the Number Base Converter can do

All common bases at once

Binary, octal, decimal, hexadecimal, and base 36 update simultaneously as you type in any field.

Any base from 2 to 36

Pick any source and target base in the 2-36 range to handle specialized numeric systems or educational exercises.

Step-by-step working

Toggle the breakdown panel to see the exact division-and-remainder steps used to convert — useful for students and teachers.

Bit-level inspection

View binary, hex, and octal digit groupings aligned so you can see which bits map to which hex or octal digits.

BigInt precision

Arbitrary-precision arithmetic means cryptographic 1024-bit numbers convert exactly with no rounding errors.

Fractional number support

Convert decimals like 3.14159 to binary or hex with configurable precision and a warning when the expansion does not terminate.

Validation with error position

Invalid digits for the source base are highlighted at their exact character position so you can fix typos quickly.

Shareable URL

Every conversion produces a URL you can bookmark or paste into chat to show the exact input and result.

Common use cases for the Number Base Converter

Programming and debugging

  • Memory address inspection: Convert hex addresses from stack traces or crash dumps to decimal to compare with array offsets or pointer arithmetic.
  • Bitmask flag decoding: Break a decimal flag value into binary to see which individual bits are set, useful for HTTP status semantics or protocol headers.
  • Color code manipulation: Convert between hex color codes (#FF6B35) and RGB decimal values (255, 107, 53) when working across different design tools.

Systems and Unix

  • File permission math: Convert between octal chmod values (755) and the binary permission triads (rwxr-xr-x) they represent.
  • Networking and subnets: Check binary representations of IP masks like 255.255.255.0 to confirm prefix length /24 matches your intent.
  • Embedded register programming: Translate datasheet hex register values into binary to verify individual bit settings before writing to hardware.

Education and study

  • Computer science homework: Get step-by-step working for base conversion questions so you can verify your hand calculation and find errors.
  • Discrete math exercises: Explore how different bases represent the same quantity, useful for understanding positional notation deeply.
  • Teaching aid: Show students in real time how incrementing a decimal value affects the binary and hex representations.

How it works

Why different bases exist, and where each shows up:
- Binary (base 2) — how hardware actually stores everything. You reach for it directly when working with bit flags, masks, and permissions where each position is a yes/no.
- Hexadecimal (base 16) — a compact stand-in for binary: one hex digit = exactly 4 bits, so a byte is always two hex digits. That's why memory addresses, colors (#RRGGBB), and byte dumps use hex — it's binary that humans can read.
- Octal (base 8) — three bits per digit; today mostly seen in Unix file permissions (chmod 755).
- Decimal (base 10) — for humans.
- Base 32 / 36 — pack numbers into short alphanumeric strings (IDs, short URLs) using letters as extra digits.

The bit-width readout tells you the minimum bits to represent the value and whether it fits common unsigned integer sizes. Useful when a protocol or struct gives you a fixed field (a uint16 port, a uint8 byte) and you need to know your value won't overflow it.

Scope: this converts non-negative whole numbers. Fractions, negative numbers (two's-complement representation), and values beyond JavaScript's safe integer limit (2^53) aren't handled — for those you need signed/float-specific tooling.

Common problems and solutions

Entering the wrong input base

'11' means three in binary, nine in octal, eleven in decimal, and seventeen in hex. Always set the input base to match what your number actually is, or every conversion will be wrong.

Expecting negative numbers or decimals

This handles non-negative whole numbers only. Negative values need two's-complement representation and fractions need floating-point handling — neither is covered here.

Very large numbers losing precision

Above 2^53 (JavaScript's safe integer limit), integer math becomes imprecise, so huge values can convert incorrectly. For big integers use language-native big-integer types.

Confusing a value with its representation

0xFF, 0o377, and 255 are the same number in different clothes — conversion changes how it's written, never the quantity. Don't treat the hex string as a different value from its decimal.

Assuming a value fits a fixed field

A number can exceed a uint8 (max 255) or uint16 (max 65535) and overflow. The bit-width readout flags which sizes it fits — check it before packing into a fixed-width field.

How it compares

Hex vs binary. Same information, but hex is four times shorter and far easier to read and type. Engineers think in hex precisely because each digit maps cleanly to 4 bits — you can eyeball 0xFF as "all ones in a byte" instantly, where 11111111 takes counting.

Hex vs decimal. Decimal is for people and business logic; hex is for anything touching memory, bytes, colors, or protocols. When a value's *bit pattern* matters, hex; when its *magnitude* matters to a human, decimal.

Octal today. Mostly one job left: Unix permissions, where each octal digit encodes read/write/execute for a user class (chmod 644). Outside that, it's largely historical.

Base 32 / 36 vs hex. When you want the shortest readable string for a number (an ID or short code), base 36 (0-9, a-z) beats hex because it uses more symbols per digit. Hex wins when byte-alignment matters; base 36 wins when compactness for humans matters.

Questions and answers

Can it convert negative numbers or decimals?

No — it handles non-negative whole numbers. Negative values require two's-complement representation and fractions require floating-point handling, which are separate concerns from base conversion.

Which base is used for colors?

Hexadecimal. A web color like #6366F1 is three bytes — red, green, blue — each written as two hex digits (00–FF). Hex is used because one hex digit equals exactly four bits, so a byte is always two digits.

What does the bit and byte info mean?

It shows the minimum number of bits to represent your value, how many bytes that is, and whether it fits in an unsigned 8-, 16-, or 32-bit integer. That tells you if the value will overflow a fixed-width field.

Why does 11 give different results?

Because its value depends on the base you say it's in: 11 is 3 in binary, 9 in octal, 11 in decimal, 17 in hex. Set the input base correctly and the conversions line up.

Is my input sent anywhere?

No. All the math runs in your browser instantly — nothing is uploaded. It's just arithmetic on the number you type.

What are base 32 and base 36 for?

Packing a number into a short alphanumeric string, like IDs or short codes. They use letters as extra digits, so the result is shorter than hex. Base 36 (0-9, a-z) is the most compact common option.

Further reading

Advertisement

Related tools

All Converters

Learn more

Explore more tools

200+ free tools that run in your browser.

Browse all tools →