Number Base Converter (Binary, Hex, Decimal, Octal)
Type a number and choose its base to see it in binary, octal, decimal and hexadecimal at once. Works with very large numbers too.
🔒 Everything you type stays in your browser. Nothing is sent to a server.
By Shah Rukh, software developer · Last updated:
How to convert decimal to binary
Divide by 2 repeatedly and write down the remainders from bottom to top. For 13: 13 ÷ 2 = 6 r 1, 6 ÷ 2 = 3 r 0, 3 ÷ 2 = 1 r 1, 1 ÷ 2 = 0 r 1, so 13 = 1101.
Quick reference
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 8 | 10 |
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| 255 | 11111111 | FF | 377 |
Prefixes like 0x (hex), 0b (binary) and 0o (octal) are accepted and ignored.
Frequently asked questions
Why do programmers use hex?
One hex digit equals exactly 4 binary digits, so hex is a compact way to write binary, like colour codes #FF0000.
Is there a size limit?
No practical limit. It uses arbitrary-precision integers (BigInt).
Does it handle fractions?
No, whole numbers only.
Related tools
QR Code Generator
Free QR codes for links, Wi-Fi, text and contacts.
Discord Server Template
Design channels and roles, then build them in one click.
Discord Moderation Bot
Make your own mod bot with kick, ban, mute and filters.
Discord Bot Maker
Build a custom Discord bot without coding.
Discord Welcome Bot
Custom welcome messages and auto-roles for new members.
Color Picker & Palette
HEX, RGB and HSL codes plus matching palettes.