Skip to content
SmaftyTools

Binary/Hex/Decimal Converter

Convert numbers between binary, octal, decimal and hexadecimal instantly — with support for huge integers and 0x/0b prefixes.

About Binary/Hex/Decimal Converter

The Binary/Hex/Decimal Converter is a free number base converter that translates numbers between binary, octal, decimal and hexadecimal simultaneously — type a value once in any base and instantly read its equivalent in all four. It covers the everyday conversions developers need: binary to decimal, hex to decimal, decimal to binary and every other pairing between the four bases, without switching tools or doing the arithmetic by hand.

It accepts the prefixes you'd actually type in code — 0b for binary, 0o for octal, 0x for hexadecimal — plus underscore digit separators (like 1_000_000) for readability, so you can paste a literal straight out of your source code. That makes it useful well beyond homework: working out a bitmask, decoding a color value like #FF6600 into its decimal RGB channels, reading a Unix file permission (like 0755) in binary to understand exactly which bits are set, or converting a memory address between hex and decimal while debugging. It's also a quick way to sanity-check a subnet mask, verify a checksum digit, or translate an ASCII character code between its decimal and hexadecimal form when working with raw byte data or a binary file format.

Because the converter is built on JavaScript's BigInt rather than ordinary numbers, it converts arbitrarily large integers exactly, with no precision loss past 2⁵³ — the point where regular floating-point numbers start silently rounding. That makes it reliable for 64-bit values, large hash fragments and cryptographic key material where a single incorrect digit would matter.

Every keystroke is validated against the selected base's allowed digits, so a stray 'a' typed into a decimal field or an '8' typed into an octal field is flagged immediately, rather than producing a silently wrong conversion downstream.

How to Use the Binary/Hex/Decimal Converter

  1. Type a number and select which base it's written in.
  2. Read the equivalent binary, octal, decimal and hexadecimal values instantly.
  3. Click the copy icon next to any base to grab that representation.

Features

  • Binary, octal, decimal and hexadecimal in one view
  • Exact conversion of arbitrarily large integers (BigInt)
  • Accepts 0b/0o/0x prefixes and underscore separators
  • Instant validation with clear errors

Examples

Converting decimal to hex, binary and octal

Input

255 (decimal)

Output

Hex: FF · Binary: 11111111 · Octal: 377

Decoding a hex color channel

Input

0xFF6600 (hex)

Output

Decimal: 16737792 · Binary: 111111110110011000000000

Converting a Unix permission from octal

Input

0o755 (octal)

Output

Decimal: 493 · Binary: 111101101 · Hex: 1ED

Frequently Asked Questions

Why is hexadecimal so common in programming?

One hex digit represents exactly four bits, so a byte is always two hex digits. That makes hex a compact, readable shorthand for binary data — colors, memory addresses, hashes.

How large a number can it convert?

Effectively unlimited — the tool uses JavaScript BigInt, which handles integers of any length exactly, well beyond the 64-bit range.

Can I convert a hex color code like #FF6600 to decimal RGB?

Yes — enter the hex digits (with or without a leading 0x) and read the decimal value directly, or split the six hex digits into pairs and convert each pair separately to get the individual red, green and blue channel values.

Is the number base converter free?

Yes, the number base converter is completely free with no usage limits. No signup, no account and no installation required.

Is my data safe?

Yes. All processing happens locally in your browser using JavaScript — nothing you type is uploaded or stored on our servers.