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

DecimalBinaryHexOctal
1111
81000810
101010A12
151111F17
16100001020
25511111111FF377

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.

๐ŸŽจ

Color Picker & Palette

HEX, RGB and HSL codes plus matching palettes.

๐ŸŒ—

Contrast Checker

Check WCAG AA/AAA colour contrast for text.

๐Ÿ”ค

Base64 Encoder / Decoder

Encode or decode Base64 text (UTF-8 safe).

๐Ÿ”—

URL Encoder / Decoder

Percent-encode or decode URLs and query strings.

๐ŸŒˆ

CSS Gradient Generator

Linear, radial and conic gradients with CSS code.

See all Developer Tools โ†’