Binary, Octal, Decimal & Hexadecimal Converter

Binary, Octal, Decimal & Hexadecimal Converter

Enter a whole number in any base and see it in binary, octal, decimal and hex, with no size limit.

Spaces and underscores are ignored, so 1111_0000 and FF FF both work.

8 bits (1 byte) needed to store this value unsigned.

Multi-Base Conversions Client-Side Execution
Decimal (Base 10)
255
Hexadecimal (Base 16)
0xFF
Binary (Base 2)
1111 1111
Octal (Base 8)
377

At a Glance

Category
Developer Encoders & Number Systems
Best For
Computer science students, embedded systems developers, reverse engineers, and web programmers
Privacy
100% in your browser: nothing you enter is uploaded
Time Required
Under a minute
Cost
Free Forever
Updated
November 2026

Quick Overview

What This Tool Does

The Binary, Octal, Decimal & Hexadecimal Converter is an interactive numerical utility for inspecting and transforming integers across foundational computing radices. It calculates synchronized binary strings, octal masks, decimal values, and uppercase hexadecimal notations simultaneously.

Who Should Use It

Systems programmers working with memory addresses, embedded engineers configuring bitmasks and registers, web developers debugging color codes and byte streams, and students learning computer architecture.

When to Use It

Use this tool when debugging low-level memory dumps, configuring hardware registers, translating POSIX file permission octals, or deciphering network packet headers.

Why It Is Useful

Manual radix conversions between decimal and binary/hexadecimal are tedious and prone to mental transposition errors. Instant multi-base visualization accelerates systems debugging and algorithm implementation.

Key Features & Capabilities

Convert From Any Base

Choose decimal, hexadecimal, binary or octal as the input base; the other three representations update as you type.

Readable Binary and Hex

Binary output is grouped into 4-bit nibbles (1111 1111) and hex is shown in uppercase with a 0x prefix; the tool also reports how many bits and bytes the value needs.

Copy Button on Every Result

Each converted value has its own Copy button that copies the plain digits (no spaces or prefix) for pasting into code or a terminal.

Exact for Large Numbers

Uses BigInt arithmetic in your browser, so 64-bit and larger values convert exactly instead of being rounded, and nothing is sent to a server.

How to Use This Tool

1

Choose the Input Base

Select whether the number you have is decimal, hexadecimal, binary or octal. Tip: Large values are fine: the tool uses BigInt, so numbers beyond 9,007,199,254,740,991 convert exactly.

2

Type or Paste the Number

Enter the value (for example 255, FF, 0xFF or 1111 1111). Invalid digits for the chosen base show a message saying which digits are allowed. Tip: Each hexadecimal character corresponds directly to exactly 4 binary bits (a nibble).

3

Read the Other Bases

Review the decimal, hex, binary and octal results and the bit and byte length, for example to check byte boundaries (8, 16, 32 or 64 bits). Tip: For example, decimal 65535 yields exactly sixteen 1s in binary (1111111111111111) and FFFF in hex.

4

Copy the Notation You Need

Click Copy next to any result to copy its bare digits into your IDE or terminal. Tip: Remember to prefix hexadecimal values with 0x and binary values with 0b in languages like C, Python, and JavaScript.

Worked Transformation Example

Converting Between Bases With BigInt in JavaScript

A developer parses a hex string and prints it in the other bases without losing precision.

Sample Inputs
Input Payloadconst n = BigInt("0xFF"); const bin = n.toString(2); const oct = n.toString(8); const dec = n.toString(10);
Transformed Outputconsole.log({ bin, oct, dec }); // { bin: "11111111", oct: "377", dec: "255" }
Calculation Breakdown
BigInt accepts 0x, 0b and 0o literals and its toString(radix) works at any size, unlike Number, which loses precision above 2^53 - 1.
Specification: IEEE 754 / ECMAScript Number Radix Conversion

Technical Specification & Algorithm

Parses a non-negative integer written in base 2, 8, 10 or 16 into a JavaScript BigInt (digit by digit, n = n x base + digit), then renders it with BigInt.prototype.toString(radix) in each of the four bases. Because BigInt has no fixed width, values beyond Number.MAX_SAFE_INTEGER (2^53 - 1) convert exactly.. Zero external network requests, analytics beacons, or server telemetry dispatched. Executed in 100% Client-Side Web Browser JavaScript Engine (V8 / WebKit / SpiderMonkey).

Formula / AlgorithmIEEE 754 / ECMAScript Number Radix Conversion
const n = BigInt("0xFF");
const bin = n.toString(2);
const oct = n.toString(8);
const dec = n.toString(10);

Frequently Asked Questions

Why does hexadecimal FF equal decimal 255?
Hexadecimal FF equals (15 * 16^1) + (15 * 16^0) = 240 + 15 = 255, representing the maximum value of an 8-bit unsigned byte.
What is the relationship between octal and binary?
Each octal digit (0–7) represents exactly 3 binary bits. For example, octal 7 is binary 111, and octal 5 is binary 101.
Can I convert negative numbers with this tool?
No. The converter handles non-negative whole numbers. Negative values in computing are usually stored in two's complement, which depends on a fixed width such as 8, 16 or 32 bits, so convert the magnitude here and apply two's complement for your word size.
Does this converter require an internet connection?
No. The conversion executes entirely using native browser JavaScript arithmetic with zero external network dependencies.
Can it convert numbers larger than 64 bits?
Yes. The tool uses JavaScript BigInt, which has no fixed width, so a 128-bit hash or any longer value converts exactly. It also tells you how many bits and bytes the value needs.

Complementary QuickForma Utilities