Skip to content
Changelog
new toolcalculators

Base Converter

v1.0

The Base Converter converts integers between binary, octal, decimal and hex.

Type into any of the four linked fields and the other three update instantly. There's no size limit, so a single bit and a hundred-digit number convert exactly. Negative values work in every field as a - plus digits, and you can paste 0xFF, 0b1010 or 0o17 into the matching field with its prefix. Long values are grouped for readability when you're not editing, and the copy buttons give you the plain digits.

A separate two's-complement view shows what a negative value looks like in a fixed width. Pick 8, 16, 32 or 64 bits to see the hex and binary a CPU would store, or a note if the value doesn't fit. A bit grid shows every bit of that pattern. Click one to flip it and all four fields update.

Text mode converts text instead of numbers. Type anything and see its UTF-8 bytes as binary, hex and decimal lists, or edit any list and the text comes back, so you can paste a byte dump from a hex editor or packet capture and read it. Multi-byte characters are counted properly: "Hello, 世界!" is eleven characters and fourteen bytes. If a byte list isn't valid UTF-8 (a truncated sequence, a stray continuation byte, an overlong encoding or a surrogate), the tool names the problem and the byte where it starts. Hex bytes can have an optional 0x prefix.

Your value, width, bit-view preference and mode are remembered on this device. Share puts the value and width in a link. Nothing is uploaded.

All changes