Number Base Converter

Convert between binary, octal, decimal, hexadecimal and any base up to 36, including very large integers.

Input base
Value

Very large numbers are supported, well past what a normal JavaScript number can hold.

Custom base
36

Any base from 2 to 36, using digits 0 to 9 then letters a to z.

How to Convert Between Number Bases

1

Pick the input base

Tell the tool what you are pasting: binary, octal, decimal or hexadecimal. Common prefixes such as 0x, 0b and 0o are stripped automatically, so you can paste straight from code.

2

Enter the value

Type or paste the number. If a digit is not valid for the base you chose, for example a 2 in a binary number, you get a clear error instead of a silently wrong result.

3

Read every base at once

Binary, octal, decimal and hexadecimal are all shown together, plus a custom base you can slide anywhere from 2 to 36. Each row has its own copy button.

Features

Binary, octal, decimal and hexadecimal shown simultaneously
Any custom base from 2 to 36
Arbitrary precision, so very large integers convert exactly
Automatic handling of 0x, 0b and 0o prefixes
Underscores and spaces in the input ignored
Clear validation when a digit is not legal for the chosen base
Copy button on every representation
Free, runs in your browser, nothing uploaded

Frequently Asked Questions

Binary, octal, decimal and hexadecimal are always shown, and the custom slider covers every base from 2 to 36. Above base 10 the digits continue with the letters a to z.

Yes. Conversion uses arbitrary precision integers rather than normal JavaScript numbers, so values far beyond the safe integer limit convert exactly with no rounding.

No. Prefixes such as 0x, 0b and 0o are stripped automatically, so you can paste a literal straight out of source code without editing it first.

Hexadecimal allows 0 to 9 and a to f only. A letter beyond f, or a stray character such as a comma or an h suffix, makes the value invalid for that base.

Not currently. It handles non-negative integers. For negative values in binary, what you usually want is a two's complement representation at a fixed bit width, which is a different question.

Integers only. Fractional conversion between bases produces repeating expansions in most cases and needs a precision setting, so it is deliberately out of scope here.

One hexadecimal digit maps exactly to four bits, so a byte is always two digits. That makes colours, memory addresses, and byte-level data far easier to read than the equivalent binary.

Yes, completely free with no sign-up, like every tool in the Pinkontin developer toolbox.

Need a Custom Tool or Application?

We build production-grade web applications, SaaS platforms, and developer tools. Let's talk about your project.

or book a free call