ASCII, Hex, Binary, Decimal & Base64 Converter
Convert text between ASCII, hexadecimal, binary, decimal, and Base64 formats instantly. Edit any field and all other formats update live. Essential for programmers, network engineers, and computer science students. See also our Binary to ASCII and Hex to ASCII converters.
Enter or edit any field below — all other formats will update automatically.
How to Convert ASCII, Hex, Binary & Decimal
- Select the input type from the dropdown (Text, Hex, Binary, Decimal, or Base64).
- Enter your value in the text area.
- Click Convert to see all representations simultaneously.
- Copy any result using the Copy button next to each format.
- Switch input types to convert from any format to all others.
ASCII:
ASCII stands for "American Standard Code for Information Interchange". The computer understands only numbers (0,1) to understand alphabets ASCII codes used. The list of 128 ASCII encodes characters which include 95 printable characters arranged into 7-bit integers. The printable characters include digits 0 - 9, lower letters a to z, upper letters A to Z and symbols.
Example:
In ASCII encodes lower letter "m" represent in the binary format as "01001101", Hexadecimal as "4D" and decimal as "109".
Hexadecimal:
A hexadecimal number is also called base-16 number system cause it has 16 digits in it from 0 to 9 & A to F. In computer languages coding it makes easy to write large numbers. Example for hexadecimal is 4B6. Each hex digit represents exactly 4 binary bits, making it the preferred format for representing memory addresses, color codes (#FF5733), and byte-level data.
Binary:
A binary number system having two numbers "0", "1" and it is known as Base-2 number system. The base-2 number system used in digital electronics to write instruction for electronic equipment and invented by Gottfried Leibniz. In this zero represents OFF, 1 represents ON cause electronic equipment used gates. Example of a binary number is 10110.
Decimal:
A decimal number system is also called a Base-10 (Hindu Arabic) number system. In this system 10 digits used they are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. In this system, we can write fractional numbers. Example of a decimal number is 129.56. Each ASCII character has a unique decimal value from 0 to 127 (standard) or 0 to 255 (extended).
Base64:
It is a binary to ASCII converter with a base64 format that introduces from MIME encoding scheme. Base64 used to keep data unchanged while transfers over media (ex: mail). For base64 different type of implementation follows but for MIME use for first 62 values lower case a-z, uppercase A-Z, and numbers 0-9. In other base64 implementation use different symbols for last two digits.
Conversion Formulas
ASCII to Binary:
For each character: binary = charCode.toString(2).padStart(8, '0')
Example: 'A' → 65 → 01000001
ASCII to Hexadecimal:
For each character: hex = charCode.toString(16).padStart(2, '0')
Example: 'A' → 65 → 41
ASCII to Decimal:
For each character: decimal = charCode
Example: 'A' → 65
ASCII to Base64:
Encode using btoa() or manual 6-bit grouping
Example: 'Hello' → 'SGVsbG8='
Binary to ASCII:
For each 8-bit group: char = String.fromCharCode(parseInt(binary, 2))
Example: 01000001 → 65 → 'A'
Hex to ASCII:
For each 2-digit pair: char = String.fromCharCode(parseInt(hex, 16))
Example: 41 → 65 → 'A'ASCII Reference Table
| Character | Decimal | Hex | Binary |
|---|---|---|---|
| A | 65 | 41 | 01000001 |
| B | 66 | 42 | 01000010 |
| Z | 90 | 5A | 01011010 |
| a | 97 | 61 | 01100001 |
| z | 122 | 7A | 01111010 |
| 0 | 48 | 30 | 00110000 |
| 9 | 57 | 39 | 00111001 |
| Space | 32 | 20 | 00100000 |
Frequently Asked Questions
What is ASCII encoding?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric values to 128 characters including letters, digits, punctuation, and control characters. It uses 7 bits per character (values 0-127).
How do I convert text to binary?
Each character is first converted to its ASCII decimal value, then that decimal number is converted to an 8-bit binary representation. For example, 'H' = 72 in decimal = 01001000 in binary.
What is Base64 encoding used for?
Base64 encodes binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It is used for email attachments (MIME), embedding images in HTML/CSS (data URIs), and transmitting binary data over text-only protocols.
Why is hexadecimal used in computing?
Hexadecimal is compact (each digit = 4 bits) and human-readable compared to binary. One byte (8 bits) is always exactly 2 hex digits (00-FF). It is used for memory addresses, color codes, MAC addresses, and debugging.
What is the difference between ASCII and Unicode?
ASCII defines 128 characters using 7 bits. Unicode extends this to over 143,000 characters covering all world scripts. UTF-8 is the most common Unicode encoding, where ASCII characters (0-127) use 1 byte and other characters use 2-4 bytes.
Objective of Measurement:
Measurement is the most important aspect of our life. We use measurement in science, engineering, business trading, personal life, education, and more other fields. As technology is growing day by day so we need a highly accurate and easy convenient global measuring system in each and every field. It is essential to use standard measurement in every field that everyone to be sure that they not get cheated.
History of Measurement:
In history for measurement people used the human body as a tool. For measuring length used forearm, hand, foot & finger as a unit. The foot, finger is a subdivided shorter unit of a length. This type of measurement is not accurate cause different in size of the arm & finger for different people & some of the countries still using it. In history, there were lots of measuring systems developed but mostly used imperial, the metric system of measurement. We use these systems for measure distances, volume, weight, speed, area etc. Due to this a major problem everyone is facing while doing trading between the countries. A huge improvement in civilization, It necessary to improve measuring standards. Nowadays International Standard (SI) units are used as a global measurement system.