Text to Binary Converter
Convert text to binary or hex byte values, and convert them back to text.
Convert between binary, octal, decimal, hexadecimal and any base.
Number Base Converter shows the same number written in binary, octal, decimal and hexadecimal at the same time. Type into any of the four boxes and the other three update, so you never have to remember which direction you were converting in.
Below the four common bases, a custom converter handles any base from 2 to 36, using the digits 0 to 9 followed by the letters A to Z. That covers base 32 encodings and the occasional base 36 identifier, as well as the teaching cases like base 5 that come up in coursework.
Each box validates what you type against its own base, so a 2 in a binary field or a G in a hexadecimal field produces a clear message rather than a wrong answer. A panel underneath shows how many bits the value occupies and what it looks like grouped into bytes, which is the detail you usually want when the number came from a register, a permission mask or a colour value.
The number base converter is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:
Because one hexadecimal digit represents exactly four bits, so a byte is always two digits and the mapping to binary is immediate. Decimal has no such alignment, which is why memory addresses and colour values are almost always written in hex.
Very large values are handled precisely using big-integer arithmetic, so a sixty-digit number converts without losing its last digits, which is where simpler converters go wrong.
Yes, with a minus sign. Note that this is a plain negative value, not a two's complement representation, which is a different thing and depends on a fixed word size.
No. Conversion covers whole numbers. Fractional values in another base are a separate problem with its own rounding behaviour.
Because the digits are 0 to 9 followed by A to Z, which gives 36 symbols in total. Any higher base would need symbols that nobody agrees on.
How many binary digits the value occupies, which is how you tell whether a number fits in 8, 16, 32 or 64 bits. The byte grouping underneath shows the same value split into groups of eight for easier reading.
If the number base converter is not quite what you need, these other free tools solve closely related problems.
Convert text to binary or hex byte values, and convert them back to text.
Turn any HEX code into RGB and HSL values, with alpha support.
Encode any text, including emoji and accents, to a Base64 string.
Generate cryptographic hashes of text, computed in your browser.
Enter R, G and B values and get the matching HEX and HSL colour.