Number Base Converter

All tools

Arbitrarily large integers are supported. Prefixes 0x, 0o, and 0b are recognized in auto-detect mode.

About the Number Base Converter

This converter translates numbers between binary, octal, decimal, hexadecimal, and any radix from 2 to 36. It uses big-integer arithmetic, so values of any length convert without losing precision.

Auto-detect mode understands the common prefixes 0x (hex), 0o (octal), and 0b (binary). Spaces and underscores used as digit separators are ignored, so you can paste values straight from source code.

How to convert between number bases

  1. Type or paste a number — 255, 0xFF, or 0b11111111 all work.
  2. Pick the input base, or leave auto-detect to honor 0x/0o/0b prefixes.
  3. Read the value in binary, octal, decimal, hex, and Base36 at once.
  4. Set a custom base between 2 and 36 for anything else.

Tips

  • Underscores and spaces in the input are ignored, so 1_000_000 parses fine.
  • Negative numbers convert as signed mathematical values, not as two's complement bit patterns.
  • Base36 uses digits 0-9 and letters a-z; it is handy for compact IDs in URLs.
  • Conversions use BigInt, so numbers longer than 64 bits stay exact.

Base conversion checks before using converted values

Binary, octal, decimal, and hex are just notations for the same number, but prefixes, signs, and width still cause bugs.

Verify the input base

The digits 10 mean two in binary, eight in octal, ten in decimal, and sixteen in hex. Confirm what the source actually uses.

Watch numeric prefixes

0x, 0o, and 0b prefixes change how parsers read a value. Strip or keep them consistently across your codebase.

Mind signed representations

This tool shows the mathematical value. Hardware and low-level code often use fixed-width two's complement for negatives.

Check leading zeros

Some formats are width-sensitive: a color needs 6 hex digits and file permissions use 3 or 4 octal digits.

Related tools

You may also find these tools useful.

Number Base Converter FAQ

What bases are supported?
Any radix from 2 to 36 — the digit alphabet is 0-9 plus a-z. Binary, octal, decimal, hex, and Base36 are shown by default.
How large can the numbers be?
Effectively unlimited. The tool uses big-integer arithmetic, so precision is never lost, unlike converters built on 64-bit floats.
How are negative numbers handled?
As signed values with a minus sign. If you need a two's complement bit pattern, convert the absolute value and apply the width yourself.
Does it run locally?
Yes. Everything is computed in your browser; nothing is sent to a server.