PublicSoftTools

Number Base Converter Online Free

Convert any number between binary, octal, decimal, hexadecimal, and any base from 2 to 36 — instantly. Paste values with 0b, 0x, or 0o prefixes directly from code. No signup, runs entirely in your browser.

From base
Try an example:

How to Convert Between Number Bases

  1. 1Type or paste a number into the Number field. You can use plain digits or standard prefixes: 0b for binary, 0x for hex, 0o for octal — the tool detects the base automatically.
  2. 2Select the source base using the quick buttons (2, 8, 10, 16) or type any base from 2 to 36 in the custom field. If you used a prefix, the base is detected and the buttons are ignored.
  3. 3The results panel shows your number in Binary, Octal, Decimal, Hexadecimal, Base 32, and Base 36 simultaneously. Binary output is grouped in nibbles (4-bit blocks) for readability.
  4. 4Use the Custom base row to convert to any base from 2 to 36. Click any Copy button to copy that representation to your clipboard.

Binary, Octal, Decimal, and Hexadecimal at a Glance

Decimal (base 10) is the system we count in every day. Binary (base 2) maps directly to the on/off states of transistors in CPUs and memory chips — every piece of data a computer stores is ultimately a sequence of 0s and 1s. Octal (base 8) was historically used on PDP machines and survives today in Unix/Linux file permission modes (e.g. chmod 755). Hexadecimal (base 16) is the most common shorthand for binary data in software: one hex digit represents exactly one nibble (4 bits), so two hex digits cover one byte — which is why memory addresses, colour codes, and SHA hashes are written in hex.

This converter uses JavaScript BigInt internally, so there is no floating-point rounding. Numbers with hundreds of digits convert exactly.

Tips for Working with Number Bases

Hex to Binary shortcut

Each hex digit equals exactly 4 binary bits. A maps to 1010, F maps to 1111. So 0xFF = 1111 1111 in binary. You can convert by hand digit-by-digit once you memorise the 16 nibble patterns.

Octal file permissions

Linux permission bits are three octal digits: owner, group, other. Each digit is 0–7, mapping to three bits (read=4, write=2, execute=1). So chmod 755 means rwxr-xr-x, which is binary 111 101 101.

Colour codes are hex bytes

#FF5733 is three hex bytes: FF (red=255), 57 (green=87), 33 (blue=51). Each pair of hex digits represents one 8-bit channel value from 0 to 255.

Bit flags in bitfields

Flags are often powers of 2: 1, 2, 4, 8, 16... In hex: 0x01, 0x02, 0x04, 0x08, 0x10. OR them to set multiple flags, AND to read a specific one. The binary view makes overlaps obvious.

Base 36 for short IDs

Base 36 uses 0–9 and A–Z, making it URL-safe and case-insensitive. A 6-digit base-36 string encodes over 2 billion values (36^6), useful for compact unique IDs.

Prefix values in code

Most languages accept 0b, 0x, 0o directly as literals. Paste them here to inspect the value in all bases without stripping the prefix first — the tool auto-detects it.

Frequently Asked Questions

What is a number base?

A number base (or radix) defines how many unique digits are used to represent numbers. Decimal (base 10) uses digits 0–9 and is what we use in everyday life. Binary (base 2) uses only 0 and 1 and is what computers use internally at the hardware level. Octal (base 8) uses 0–7 and appears in Unix file permissions. Hexadecimal (base 16) uses 0–9 and A–F and is widely used in programming, colour codes, and memory addresses.

How do I convert a binary number to decimal?

Enter the binary number in the input field and select base 2 as the source (or prefix it with 0b — for example 0b1010). The decimal result appears instantly in the Base 10 row. You can also type 0xff for hexadecimal or 0o777 for octal and the tool auto-detects the base from the prefix.

What does the 0b / 0x / 0o prefix mean?

These are standard programming prefixes used in languages like C, Python, JavaScript, and Rust. 0b signals a binary literal (base 2), 0x signals a hexadecimal literal (base 16), and 0o signals an octal literal (base 8). This tool auto-detects these prefixes so you can paste values directly from code without stripping the prefix first.

What does "nibble grouping" mean for binary output?

A nibble is a group of 4 binary bits (half a byte). Grouping binary digits in sets of 4 from the right — for example displaying 11001000 as 1100 1000 — makes the binary representation much easier to read, especially when checking individual bytes or converting mentally to hex (each hex digit corresponds to exactly one nibble).

What is the custom base feature?

The custom base output section lets you convert to any base from 2 to 36. Bases above 10 use the letters A–Z (uppercase) as additional digits — for example base 16 uses A–F, base 36 uses 0–9 and A–Z. Base 36 is the highest supported because there are only 10 digits and 26 letters, giving 36 distinct digit symbols. The "From base" field also accepts a custom value so you can convert from any base as well.

What are bits, bytes, and nibbles shown in the info bar?

The info bar shows how many binary digits (bits) are needed to represent your number, how many 8-bit bytes that corresponds to (rounded up), and how many 4-bit nibbles (rounded up). These are important when working with data sizes, bitfields, and memory layouts in systems programming.

Can I convert negative numbers?

Yes — prefix your input with a minus sign (e.g. -255, -0xff, -0b11111111). The tool converts the magnitude and prepends the negative sign to all output bases. Note that the bit/byte count shown reflects the magnitude, not a two's complement or signed representation.

Is there a size limit?

No practical limit. The converter uses JavaScript BigInt internally, so it handles arbitrarily large integers with no floating-point precision loss. You can convert numbers with hundreds of digits without any rounding errors.