Bits
8 bits, most significant first. Click a bit to flip it, or move with the arrow keys.Related tools
- Escape / UnescapeEncode and decode Base64, URL, HTML, JSON, hex and thirty more formats side by side, with file support and errors that point at the bad character.
- Language Code LookupLook up a language by ISO 639 code, English name, or native name, or a writing script by ISO 15924 code.
- Number to WordsSpell out a number in English words, including negative, decimal, ordinal, and currency forms, or convert words back into a number.
- Line ToolsSort, dedupe, filter, trim, number, shuffle, split and join lines of text, with every step combined on one page.
- Roman Numeral ConverterConvert between whole numbers and Roman numerals in either direction, with strict canonical validation and vinculum notation above 3999.
- Case ConverterConvert text into camelCase, snake_case, kebab-case, Title Case, UPPERCASE and a dozen more cases at once, with a copy button on each.
What it does
Converts whole numbers between binary, octal, decimal, hexadecimal, base 32, base 36, base 58, base 64, and any custom base from 2 to 62, using arbitrary-precision arithmetic so numbers of any size round-trip exactly. Every base is its own editable row, so you can type in whichever one you have. Pick a bit width to see negative numbers as two's complement, and use the bit grid to flip individual bits.
How to use it
Type or paste a number into any row and every other row updates at once. Prefixes like 0xFF, 0b1010 and 0o17 are accepted, as are spaces, underscores and commas between digits. Choose 8, 16, 32 or 64 bit to get fixed-width patterns and the signed and unsigned readings side by side, then click bits in the grid to toggle them. Each row has its own copy button, with optional digit grouping, prefixes and uppercase.
Why this one
Most base converters cap out at 32-bit integers and silently overflow on anything larger, make you pick a From and a To base for every conversion, and show a negative number as a minus sign in front of the binary. This one uses BigInt throughout, converts in every direction at once, and shows real two's complement, with no ads, and your files and inputs never leave your device.
FAQ
- Does it handle numbers bigger than 64 bits?
- Yes. Conversion uses BigInt, so values of arbitrary size (128-bit, 256-bit, or larger) convert exactly in every row. The bit grid and the byte facts under it cover values up to 64 bits, since they exist for quick bit-level inspection.
- How do I see the two's complement of a negative number?
- Pick a bit width, then type the negative number in the decimal row. With 8 bit selected, -42 shows as 11010110 in binary and d6 in hexadecimal, and the panel under the bit grid lists both the signed and the unsigned reading of that pattern. With the width set to any size, a negative number is shown as a minus sign and its magnitude, because two's complement has no meaning without a width.
- What alphabets do base 32, base 58, base 62 and base 64 use?
- Base 32 uses the RFC 4648 alphabet (A to Z, then 2 to 7). Base 58 uses the Bitcoin alphabet, which leaves out 0, O, I and l. Base 64 uses A to Z, a to z, 0 to 9, plus and slash as digits of a number, which is not the same thing as Base64 encoding of bytes. Custom bases up to 36 use 0 to 9 then a to z, and bases 37 to 62 use 0 to 9, A to Z, then a to z, where case matters.
Keyboard shortcuts: press ? anywhere on this page to see them.