Number Base Converter

New

Convert integers between binary, octal, decimal, and hexadecimal — plus any custom base from 2 to 36. Uses arbitrary-precision BigInt so even very large numbers convert without losing precision.

100% in your browserNothing is uploaded
No signup requiredUse it instantly
Free foreverNo ads on the tool
Binary (base 2)
Octal (base 8)
Decimal (base 10)
Hexadecimal (base 16)
Base

Uses arbitrary-precision BigInt, so even very large integers convert without losing precision. A leading 0x, 0b, or 0o prefix is ignored.

About This Tool

Numbers wear different clothes depending on the context. A byte is natural in binary, a color in hexadecimal, a file permission in octal, and a price in decimal. Converting between these bases is routine for programmers, students, and anyone working close to the hardware.

The four everyday bases

- **Binary (base 2)** — the language of hardware: only 0 and 1. Each digit is one bit. - **Octal (base 8)** — three bits per digit; still used for Unix file permissions (`chmod 755`). - **Decimal (base 10)** — the human default. - **Hexadecimal (base 16)** — four bits per digit, so it maps cleanly onto bytes. Used for colors (`#FF8800`), memory addresses, and hashes.

Why hex and binary go together

One hex digit is exactly four binary digits, which is why programmers reach for hex to write binary compactly. `0xFF` is `1111 1111` — a full byte. This clean relationship is the reason colors, MAC addresses, and low-level data are almost always shown in hex rather than decimal.

Arbitrary precision

Ordinary JavaScript numbers lose accuracy above 2⁵³. This converter uses `BigInt`, so even a 200-digit number converts exactly, digit for digit, with no rounding. That matters when you are working with large hashes, cryptographic values, or 64-bit identifiers.

Custom bases

Beyond the standard four, you can convert to any base from 2 to 36 (digits 0–9 then A–Z). Base 36 is sometimes used to shorten numeric IDs into compact alphanumeric strings — the same idea behind short-link codes.

Frequently Asked Questions

Related Tools

Last updated: July 29, 2026