Flip a number between binary, octal, decimal and hex. The other bases follow the field you type in, and nothing is sent to a server.
A positional base says how many digits exist and what one place is worth. Binary has 2 digits, octal 8, decimal 10 and hexadecimal 16. The same integer is written with a different digit string in each base.
One hexadecimal digit is exactly 4 bits, and one octal digit is exactly 3 bits. That is why bit masks are comfortable in hex, and why Unix permission bits are written in octal.
255
11111111 377 ff
0x10
10000 20 16
102 typed in binary
110 typed in binary
A leading minus is rejected. The page shows the magnitude of a non-negative integer, not a two’s-complement bit pattern.
An unreadable value keeps the previous result on screen. Clearing the source field clears the other three.
Values are JavaScript big integers, so they are not limited to 2^53 − 1 (9,007,199,254,740,991). The field you type is capped at 512 characters, and each other base must fit in 2,048 digits.
The share link stores the source base and the text of that field. The other three writings are computed again when the link is opened.
The word hexadecimal joins Greek hex (six) and Latin decem (ten): 16 is six plus ten. Each hex digit lines up with a nibble, four bits.
The 0x prefix comes from C. JavaScript added the 0b and 0o prefixes for binary and octal integer literals in ECMAScript 2015, and numeric separators with underscores in ECMAScript 2021.