Binary Converter
Type a value in any field and the others follow. Everything is converted in your browser: nothing is uploaded.
Binary Converter: Binary, Decimal, Hex and Text
Type a number in the binary field and the decimal, octal and hexadecimal fields follow at once, and the other way round. The "Text and codes" tab turns text into binary and binary into text, and the "Float and hex" tab shows how a decimal number is stored in 32 or 64 bits. Everything happens in your browser: nothing you type is uploaded.
What is binary
Binary is the number system with two digits, 0 and 1: base 2. Computers use it because a circuit is either on or off. One binary digit is a bit, eight bits make a byte, and one byte holds a number from 0 to 255 or one letter of English text.
How to convert binary to decimal and back
Every position is worth twice the one to its right: 1, 2, 4, 8, 16... The binary number 1011 is 1 x 8 + 0 x 4 + 1 x 2 + 1 x 1 = 11. To go the other way, divide the decimal number by 2 again and again and read the remainders from the last to the first: 13 gives 1101. The converter does this for numbers of any size, also with many hundreds of digits, without losing a digit.
Binary to text and text to binary
Text is stored as bytes, and the converter shows each byte as eight binary digits. "Hi" is 01001000 01101001. Letters of the English alphabet take one byte, other letters take two to four bytes (the UTF-8 encoding, which covers all languages and emoji). You can paste the binary with spaces, commas or line breaks between the bytes, or as one long run of digits.
Negative numbers and the bit width
Choose 8, 16, 32 or 64 bits to see the number the way a program stores it: with all the bits written, and a negative number as two's complement. In 8 bits, -1 is 11111111 and -128 is 10000000. A number that does not fit the chosen width is reported with the range that fits.
Limitations
- The numbers tab works with whole numbers. For a number with a decimal point, such as 0.1, use the "Float and hex" tab, which shows its 32 or 64 bit pattern.
- Text is converted as UTF-8. Text saved in an old code page may give other bytes.
- Numbers of up to 5000 digits are read.
Similar tools
Hex converter online: hexadecimal to decimal, binary and text and back, any size, plus float to hex (IEEE 754, 32 and 64 bit). Works in your browser.
Decimal converter online: decimal to binary, hex and octal and back, any size, with bit widths and two's complement, and text to decimal codes. Works in your browser.
ASCII converter online: text to ASCII codes in decimal, hex, binary or octal and back, with the full ASCII table. Works in your browser.
Encode text to Base64 or decode Base64 back to text online, instantly in your browser. UTF-8 and URL-safe Base64 supported.
Popular tools
Check who hosts a website: the IP address, the hosting company (ASN), the country and the city of the server. Free hosting checker for any domain.
Free IP lookup: find the country, city, coordinates and timezone of an IP address and its host name with a reverse IP (reverse DNS) lookup. IPv4 and IPv6.
Free DNS lookup online: check A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records of any domain, plus its SSL certificate. Find out why a DNS lookup fails.
Check from the United States (New York) whether a website is online: HTTP status code and response time in milliseconds. A free US ping test for any URL.