Skip to content
T
Tools.Town
Free Online Tools for Everyone
255 = 0xFF

Binary Converter

100% Free

Convert integers between binary, octal, decimal, hex — BigInt-precise so values past 2^53 work without rounding. Accepts 0b/0o/0x prefixes.

Real-time
Client-Side
BigInt-precise
Binary (base 2)
bin
Octal (base 8)
oct
Decimal (base 10)
dec
Hexadecimal (base 16)
hex
Bit width: 8

Type into any base — the others update instantly. Prefixes (0b, 0o, 0x) and underscores accepted.

Embed This Tool

Easy to Embed

Add Binary Converter to your website or blog in seconds.

  • Responsive design
  • Lightweight & fast
  • No backend required
  • Always up-to-date
<iframe
  src="https://tools.town/embed/binary-converter/"
  width="100%"
  height="600"
  style="border:none; border-radius:12px;"
  loading="lazy"
  title="Binary Converter">
</iframe>

Share This Tool

Share Instantly

Share Binary Converter with anyone — no login required.

  • Shareable link
  • No login required
  • Works on any device
  • No account needed

Share via

Advertisement

How to Use

  1. 1 Type a value into any of the 4 base rows
  2. 2 All other bases recalculate instantly
  3. 3 0b / 0o / 0x prefixes accepted (Python / C style)
  4. 4 Underscores in numbers are ignored (e.g. 1_000_000)

Features

  • 4 bases (binary, octal, decimal, hexadecimal)
  • BigInt arithmetic — no precision loss past 2^53
  • Negative integers supported
  • Strips 0b/0o/0x prefixes and underscores
  • Reports bit width
  • Hex output uppercase, easy to read

Why it Matters

Embedded developers, security researchers, and curriculum designers convert between bases constantly. JavaScript's built-in `parseInt` silently drops precision past 2^53. BigInt handles 256-bit numbers and beyond — useful for crypto-style values that don't fit in a normal number.

★★★★★

Use Cases

Embedded / Bit Manipulation

Convert register values from hex to bin to spot bit patterns

Network / IP

Convert IP octets, MAC addresses, subnet masks

Curriculum / Learning

Demonstrate base conversion to students

Frequently Asked Questions

Why is 255 in binary 11111111 (8 ones)?
Because 2^8 - 1 = 255. Each binary digit is a power of 2 (1, 2, 4, 8, 16, 32, 64, 128). Sum them all and you get 255.
Why does this support BigInt?
Plain JS Number loses precision past 2^53 ≈ 9 × 10^15. Cryptographic values (256-bit keys, hashes) far exceed that. BigInt has unlimited precision.
What does 'bit width' mean?
The number of binary digits needed to represent the value. 255 → 8 bits (fits in a byte); 256 → 9 bits (needs more than a byte).

Related Tools You Might Like

Browse more free tools