Convert between binary, octal, decimal, hexadecimal and any base up to 36, including very large integers.
Very large numbers are supported, well past what a normal JavaScript number can hold.
Any base from 2 to 36, using digits 0 to 9 then letters a to z.
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.
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.
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.
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.
Free online Base64 encoder and decoder. Convert text and data with URL-safe mode and full Unicode support, all in your browser.
Open ToolGenerate MD5, SHA-1, SHA-256 and SHA-512 hashes from any text. All four update as you type, and nothing leaves your browser.
Open ToolConvert Unix timestamps to readable dates and back, in seconds or milliseconds, with ISO, UTC and local output.
Open Tool