Skip to content
Binary Translator
Menu

How the Binary Converters Work

Updated · UTF-8 text encoding

Text and binary

Text is encoded and decoded as UTF-8 using the browser's built-in TextEncoder and TextDecoder. For English letters, digits and common punctuation that gives the standard 8-bit ASCII codes. Other characters become 2 to 4 bytes. When decoding, the translator uses strict UTF-8: if the bytes aren't valid UTF-8, it says so rather than guessing.

How binary input is split

If the bytes are separated by spaces, commas, semicolons or line breaks, each group is read as one byte, so 7-bit groups work too. If the input is one unbroken run, it's split into groups of 8 from the left, and a run whose length isn't a multiple of 8 is rejected.

Numbers

Number conversions use JavaScript BigInt, so results are exact for numbers of any length rather than rounding after 16 digits. Signed binary uses two's complement with the width set by the number of bits you enter; decimal to binary asks for 8, 16 or 32 bits when the number is negative.

Privacy

Everything runs in your browser. Nothing you type is sent to a server or stored. See the privacy policy.