← All tools
// MATH

Number Base Converter online

Convert numbers between binary, decimal, hex, and octal.

Number Base Converter logo
by
CHUNKY
MUNSTER
NUMBER BASE CONVERTER

Number Base Reference

How to Use the Number Base Converter

  1. Type a value into any of the four fields (decimal, binary, hexadecimal or octal) — the other three update on every keystroke.
  2. Enter hex without a 0x prefix and binary as plain 0s and 1s; the radix is set by the field, not by a prefix.
  3. If you type something that isn't valid for the chosen base (e.g. a 9 in the octal field), an inline error appears and the other fields stop updating until the input is fixed.
  4. For larger conversions (base 32 and base 36) or single-base output with Copy buttons, use the consolidated Number Base tool this page redirects to.

The converter is a thin wrapper around JavaScript's built-in parseInt(value, radix) for parsing and Number.prototype.toString(radix) for formatting, so the output matches the ECMAScript spec exactly. Hex output is uppercased for visual clarity, and the value stays as a JavaScript Number — accurate up to 253 − 1 (9,007,199,254,740,991). Beyond that, precision is lost and a BigInt-based tool is needed.

How the Number Base Converter Works

It is well-suited to everyday programming tasks: decoding hex colour codes, reading byte values from a hex dump, checking permission bits in octal, or sanity-checking a binary literal from a CPU manual. It is not intended for two's-complement work — negative numbers are written with a leading minus rather than as a two's-complement bit pattern — and it is not arbitrary precision, so cryptographic-sized integers should be converted with a BigInt tool instead.

Frequently Asked Questions

Why are base 32 and base 36 included alongside hex?

Base 32 is used in RFC 4648 and Crockford encodings (and by some MAC-address shorteners); base 36 (0–9 + a–z) is the densest alphanumeric encoding using only ASCII letters and digits, so it is common in short URLs and database IDs.

What is the largest number I can convert here?

Up to JavaScript's safe-integer limit of 253 − 1 (9,007,199,254,740,991). Above that, parseInt loses precision; use a BigInt-based tool for arbitrary-size integers.

Are negative numbers handled?

parseInt accepts a leading minus sign in any base, but toString writes a leading minus rather than a two's-complement representation. If you need two's complement (e.g. for low-level binary work), inspect a Bitwise Calculator instead.

Why does my hex value need to be entered without 0x?

The hex input field tells parseInt the radix directly, so prefixes are not stripped automatically. Type FF, not 0xFF, when entering into the Hexadecimal field.

Explore the full suite of MATH tools and 290+ other free utilities at Chunky Munster.