Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.
Type a number in any base and read it in all the others at once — binary, octal, decimal and hexadecimal — so you can follow a value through whichever notation the system in front of you uses.
How to use it
- 1Type the number, then set From Base to the base you typed it in — Binary, Octal, Decimal, Hexadecimal, or Custom for anything from 2 to 36.
- 2The four output rows redraw on every keystroke; each carries its own Copy button.
- 3A character that does not belong to the base you chose stops the conversion with a message naming that base, rather than quietly reading only the part it understood.
Example
- Input
- FFFFFFFFFFFFFFFF, from base 16
- Output
- decimal 18446744073709551615 · octal 1777777777777777777777 · binary sixty-four 1s
That decimal figure is exact, and it is the reason to use this rather than a browser console: a 64-bit mask sits far past JavaScript's safe-integer ceiling of 2^53, and parseInt would have handed back 18446744073709552000 — rounded, wrong in every row, with nothing on screen to suggest it was an approximation. Three smaller habits to know. Hexadecimal comes out lowercase and bare, so add the 0x yourself if your language wants one. A leading minus is carried into every row, but a decimal point is not — 3.5 is rejected because the dot is not a base-10 digit, and this converts whole numbers only. And Custom governs the input alone: zz in base 36 reads as 1295, but the four output rows are fixed, so nothing writes back out in base 36.
What happens to your data
This tool runs entirely in your browser. Your input is never uploaded to a server, never stored, and never logged. The digits are accumulated by hand into a BigInt rather than passed to parseInt, so there is no floating-point step anywhere in the path and nothing is rounded on the way through. Nothing is fetched and no history is kept: the value lives in a single state variable, and a reload puts the box back to its default 255.
Last updated August 2026
A hex value turns up somewhere you cannot compute in: an error code in a stack trace, an address in a register dump, a file permission written as 755, a flag constant in a header file someone else wrote. What you want is the same number in a notation you can reason about, and the quickest improvisation is worse than it looks — paste 0xFFFFFFFFFFFFFFFF into a browser console and it answers 18446744073709552000, which is not the number you typed, with nothing on screen to say so.
This is a base converter that does not make you choose a destination. Type the value once, say which base it is already written in, and the binary, octal, decimal and hex readings appear together and redraw as you type rather than sitting behind a Convert button. That same 64-bit mask reads back here as 18446744073709551615, exact to the last digit, and nothing you type is sent anywhere.\n\nMost visits are one specific conversion rather than a tour of the number system: binary to decimal while reading a register dump, decimal to binary for a bitmask, hex to decimal to make sense of a colour or an error code, decimal to hex going the other way, or binary to hex to compress a long string of bits into something readable. This binary converter does all of those in one place, and shows the others at the same time so you can check yourself.
How it works
Toolvore checks every character you typed against the digit set for the base you picked, then walks the string one digit at a time, multiplying a running BigInt by the base and adding the next digit. Every intermediate is a BigInt, so the value never passes through a floating-point number and nothing is rounded on the way; the four rows are simply that value rendered in base 2, 8, 10 and 16. The check runs first for a reason — a character the base does not contain stops the conversion with a message naming the base, such as "0x1F" contains digits invalid for base 16, instead of reading the part it recognises and handing back a plausible wrong answer, which is what parseInt does when it turns 1111 0000 into 15. The conversion is a pure function of the number and the base above it, recomputed on each keystroke inside the page, and nothing goes out over the network while you type.
Common use cases
- Reading a hex error code or memory address out of a stack trace or a register dump in decimal
- Checking a Unix file permission — 755 in octal is 493 in decimal and 111101101 in binary
- Working out which bits a flag or mask value actually sets before hard-coding the constant
- Converting a 64-bit ID or a hex digest to decimal without a language runtime rounding it
- Checking a decimal to binary conversion done by hand, for coursework or an interview question
Frequently asked questions
How do I convert decimal to binary, or binary back to decimal?+
Type the number and set From Base to the base it is already written in — both directions are the same operation here. Put 255 in with From Base on Decimal and the Binary row reads 11111111; put 11111111 in with From Base on Binary and the Decimal row reads 255. There is no Convert button: the four rows redraw on every keystroke, and each carries its own Copy button.
Can I paste a value with 0x in front, or with spaces in it?+
No, and it says so rather than guessing. 0x1F with From Base on Hexadecimal stops with "0x1F" contains digits invalid for base 16, because x is not a hex digit, and 1111 0000 is refused in binary because a space is not a binary digit either. Strip prefixes and grouping before you paste. Capitals are fine — FF and ff both read as 255 — but the hex row is written back lowercase and bare, so add the 0x yourself if the language you are pasting into expects one.
What about negative numbers, or a value with a decimal point?+
A minus sign is carried through every row: -8 comes out as -1000 in binary, -10 in octal and -8 in hex. That is a sign in front of the magnitude, not two's complement — two's complement needs a register width and this tool never asks for one, so if you are after the 11111000 that -8 occupies in an 8-bit register, you will not get it here. A decimal point is refused outright: 3.5 stops with an invalid-digit error, because the dot is not a base-10 digit and this converts whole numbers only.
How large a number can it take before it starts rounding?+
It does not round. The digits are accumulated into a BigInt, which has no fixed width, so how long the number is stops mattering. All 64 hex characters of a SHA-256 digest convert intact — the digest of an empty file comes back as 102987336249554097029535212322581322789799900648198034993379397001115665086549, 78 digits, beside a 256-character binary row. That is the difference worth knowing about any converter: anything built on the ordinary JavaScript number type is exact only up to 9007199254740992, so a console asked for 9007199254740993 prints 9007199254740992, whereas typed here it reads back as 9007199254740993, hex 20000000000001.
Does it handle base 3, base 36 or Base64?+
On the input side, any base from 2 to 36: choose Custom and type the base number. 2101 in base 3 reads as 64 in decimal, and zz in base 36 reads as 1295. The output side is fixed at the four rows, though, so an unusual base can be converted into binary, octal, decimal or hex but never written back out — there is no way to get a base-5 or base-36 result, and that is the tool's clearest limit. Base64 is not a numeral base at all but a way of encoding bytes as text; typing 64 into Custom gets you Base must be an integer between 2 and 36, and the Base64 encoder is a separate tool.
Is anything I type uploaded?+
No. The conversion is a few lines of arithmetic running in the page: a run of a dozen keystrokes here produced no request of any kind — nothing fetched, nothing loaded. That matters less here than on a tool that takes a file, but the numbers people paste into a converter tend to be IDs, hashes and internal addresses from a system they would rather not describe to a third party.
Related tools
Markdown to HTML
Convert Markdown source into raw HTML you can copy.
Image Compressor
Compress JPG, PNG and WebP images to a smaller file size — or to an exact target size like 100 KB.
CSV to Markdown Table
Turn CSV data into a formatted Markdown table.
Roman Numeral Converter
Convert between Roman numerals and Arabic numbers.