WikiPlus

Number Base Converter

Convert numbers between binary, octal, decimal, hex and any base 2-36. BigInt-precise. 100% free, runs in your browser, no upload.

Local processing
1.4s avg
4.8 out of 5 — based on 1,247 uses

By Sergio Robles — Founder

Binary (2)-
Octal (8)-
Decimal (10)-
Hexadecimal (16)-
Your files are processed locally in your browser. We never upload or store your data.

What is Number Base Converter?

The Number Base tool converts values between binary, octal, decimal, hex, and any base from 2 to 36. It uses BigInt math. So crypto keys, 64-bit IDs, and huge numbers convert with no rounding errors. The result shows up right away. It runs in your browser. No values leave your device. The tool reads signed integers in two's complement. It accepts 0x, 0b, and 0o input prefixes. It groups output digits for easy reading. CS students use it for binary homework. Firmware devs decode register dumps. Network admins check subnet masks across binary and decimal. Security analysts decode CTF flags. Crypto teams verify hex-to-binary round trips.

When should I use this tool?

  • Converting decimal RGB values to hexadecimal for CSS color codes
  • Translating binary flags into decimal during firmware debugging
  • Reading memory addresses shown as hex during C development
  • Teaching students how binary math relates to decimal

How do I convert numbers between numeric bases?

  1. 1Type your number into the source base input field.
  2. 2Pick the source system, such as binary or decimal.
  3. 3Choose the target system you want the result in.
  4. 4See results in binary, octal, decimal, and hex at once.
  5. 5Copy any result from its output row with one click.

Frequently asked questions

Which number bases does the converter support?

The converter supports all four bases most commonly used in computing: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16), plus a free-entry mode where you can specify any radix from base 2 through base 36. Binary uses only the digits 0 and 1 and is the native language of every CPU and digital circuit. Octal uses digits 0–7 and appears in Unix file permission strings (chmod 755), legacy network addresses, and some embedded systems contexts. Decimal is the everyday base humans use. Hexadecimal uses digits 0–9 and letters A–F and is ubiquitous in web color codes, memory addresses, cryptographic hashes, and bytecode representations. Bases beyond 16 use further letters of the Latin alphabet up to Z, giving base 36 a compact notation that some URL shorteners, serial numbers, and encoding schemes employ. All conversions run entirely in your browser using JavaScript's built-in parseInt for parsing and Number.prototype.toString for rendering — no data leaves your device. The converter accepts uppercase and lowercase letters interchangeably for bases above 10 and strips whitespace automatically so you can paste values directly from terminal output or source code. Practical tip: when working with hex color codes, remember that CSS accepts the shorthand three-digit form #RGB where each digit is doubled — #A3F expands to #AA33FF — so convert the six-digit form before doing arithmetic on the individual channel values.

Does the tool handle negative numbers and fractions?

Yes, the tool handles both negative numbers and fractional values within defined limits. For negative integers, you can prefix the input with a minus sign and the converter will produce the correctly signed representation in the target base, showing the minus sign explicitly rather than using two's complement notation unless you specifically request the raw bit pattern. Two's complement is a hardware-level encoding where the sign is embedded in a fixed-width integer; the converter's default signed representation is more portable and readable across contexts. For fractional values, the tool converts the integer and fractional parts separately. The integer portion is converted using standard repeated-division, while the fractional portion is converted using repeated multiplication by the target radix — the same algorithm taught in computer science courses. One important caveat is that many fractions that terminate cleanly in decimal do not terminate in binary or other bases. The decimal fraction 0.1, for example, requires an infinitely repeating pattern in binary (0.0001100110011…), so the converter applies a configurable precision limit, defaulting to 20 fractional digits, to avoid infinite loops. All processing happens locally in your browser — no data leaves your device. If you need exact rational arithmetic rather than floating-point approximations, consider representing your values as fractions (numerator/denominator) in decimal and converting the integers separately for maximum precision. Practical tip: when converting negative hex values from a disassembler or debugger output, check the bit width of the register (8, 16, 32, or 64 bits) so you correctly interpret two's complement into the right signed decimal range.

Why would I need to convert between bases?

Base conversion is a practical daily task for anyone working in software development, hardware design, networking, or digital security. The most common scenario is reading and writing memory addresses: debuggers, disassemblers, and CPU datasheets express addresses in hexadecimal because a 32-bit address fits neatly into 8 hex digits, far more compactly than 10 decimal digits or 32 binary digits. HTML and CSS color codes are another everyday case — #FF5733 is easier to type than its decimal or binary equivalents, yet you need decimal when doing color arithmetic or interpolating between shades. Network engineers convert between decimal and binary when subnetting IPv4 addresses, since CIDR notation like /24 means 24 contiguous binary 1-bits in the subnet mask. Embedded and systems programmers read binary literals directly to understand which hardware bits a register write is toggling. Octal appears in Unix/Linux file permissions: chmod 644 translates to binary 110 100 100, meaning owner read-write, group read, others read. Cryptographers inspect SHA or MD5 hashes expressed in hex. Game developers use powers of two to set bitmask flags. All of these tasks become instant with a base converter, eliminating manual pencil-and-paper arithmetic. Everything runs locally in your browser — no data leaves your device. Practical tip: memorize the hex-to-binary lookup table for single digits (0=0000, F=1111) so you can mentally convert hex to binary in chunks of four bits, which is much faster than converting the whole number at once.

How large a number can I convert?

The converter handles arbitrarily large integers using JavaScript's BigInt type, which was introduced in ES2020 and is supported in all modern browsers including Chrome 67+, Firefox 68+, Safari 14+, and Edge 79+. Unlike the standard Number type, which is a 64-bit IEEE 754 double-precision float and loses integer precision above 2^53 − 1 (about 9 quadrillion), BigInt stores integers with exact precision regardless of size. This means you can convert 256-bit cryptographic keys, 128-bit UUIDs, arbitrarily large SHA-512 hashes, or any integer your use case requires without rounding errors. In practice the only limit is your browser's available memory and the time you are willing to wait — very large numbers with thousands of digits will convert in a fraction of a second on modern hardware. For fractional values, standard JavaScript floating-point arithmetic is used, which introduces the usual IEEE 754 precision limits; if you need exact fraction conversion beyond roughly 15 significant decimal digits, split the number into its integer and fractional parts and handle them separately. All computation runs entirely in your browser — no data leaves your device. The input field accepts any string of valid digits for the chosen base and raises a clear error if an invalid character is detected, such as a digit 2 in a binary field. Practical tip: when pasting large hex hashes from security tools, first remove any spaces or colons that packet capture software inserts as separators — the converter will then parse the contiguous hex string correctly.

Content on this page is available under CC BY 4.0.