ToolCozy
JSON Format / DiffHOTBase64 CodecHOTURL CodecNEWTimestamp ConverterNEWUUID GeneratorHash CalculatorJWT DecoderQR Code GeneratorUnit ConverterNumber BaseData ConverterSQL FormatterIP Lookup
Image CompressHOTColor ConverterImage ConvertImage CropNEWApp Store ScreenshotNEW
Regex TesterNEWWord CounterText DiffMarkdown Preview

More Products

Playbit Games

Free online HTML5 games — play instantly in your browser

Kaola Screenshot

App Store screenshot generator with device frames & templates

Pillease

Simple pill reminder app — never miss a dose again

© 2026 ToolCozy·Privacy·Feedback

Number Base

Convert between binary, octal, decimal, and hexadecimal

About this tool

Numbers can be written in many bases — binary (base 2), octal (8), decimal (10), hexadecimal (16) — but they all describe the same value. Programmers move between them constantly: hex for memory addresses and color codes, binary for bit-flag flags, decimal for everything else.

This converter lets you type a number in any of the four bases and instantly see it in the others. Bidirectional, real-time, and entirely client-side.

How to use

Convert between bases

  1. Pick any field — binary, octal, decimal, or hexadecimal — and type a number.
  2. The other three fields update automatically.
  3. No prefix needed (no 0x or 0b) — the base is determined by which field you typed in.
  4. Click the copy icon next to any field to grab the value.

Examples

255 in all bases

Input
Decimal: 255
Output
Binary:      11111111
Octal:       377
Hexadecimal: FF

Hex color from binary

Input
Hexadecimal: 1A2B3C
Output
Decimal: 1715004
Octal:   6425474
Binary:  000110100010101100111100
Frequently asked questions
What's the maximum number this can handle?

JavaScript safe integers — 2^53 - 1, about 9.007 × 10^15 in decimal. Beyond that, precision degrades. For arbitrary-precision needs (large hashes, RSA-sized integers), use a BigInt-aware tool or a programming language that supports it natively.

Does it handle negative numbers?

Yes for decimal input — it just shows the sign. Binary and hex display the natural-number representation, not two's complement, so -5 doesn't become FFFFFFFB. If you need two's complement for fixed-width integers, that's a separate concept.

What about decimals and floating point?

Integers only. Floating-point representation across bases (especially binary) gets weird fast — 0.1 in decimal is a non-terminating binary fraction. For float internals, use a dedicated IEEE 754 visualizer.

Why is hex usually written with leading 0x?

Convention to disambiguate: 0x1A is hex, 1A on its own could be confusing. C, JavaScript, Python all accept the 0x prefix. Binary uses 0b in newer language standards. This tool omits prefixes since the field already identifies the base.

Signed or unsigned?

There's no concept of width here — the number is just the number. Two's complement (FFFF = -1 in 16-bit signed) is a CPU/data-type convention; this converter shows the value as a non-negative integer in each base.