Convert Plain Text to Hexadecimal (Base-16) Online
Encode standard English text or international characters into standard base-16 hexadecimal bytes. Our free online Text to Hex Encoder is built to assist developers, systems programmers, and computer science students in formatting hex payloads, debugging serial data connections, or testing bit-level configurations.
Character Encodings and Hexadecimal Bytes
Every character you type into a text editor is represented as a number internally. Standard ASCII maps English characters to numbers from 0 to 127. For example, the character 'H' is represented by code 72. In base-16, 72 is written as the hex value 48. This tool automates this process for any text string.
How to Convert Text to Hex (Step-by-Step)
- Character Isolation: Read the input text character by character.
- Get Code Point: Get the decimal character code (ASCII/Unicode) of the character (e.g.
Abecomes65). - Convert to base-16: Convert the decimal value to its base-16 hex representation (e.g.
65to41). - Join: Combine the hex tokens together using your preferred character separator (like spaces or commas).
Flexible Formatting
Format your hex output with standard prefixes (0x), toggle between UPPERCASE/lowercase casing, and choose custom character separators.
ASCII & UTF-8
Decodes character values safely using standard browser character mappings, supporting standard alphanumeric text.
100% Client-Side
Calculations run locally inside your browser, providing maximum security for private data.
Text to Hex Reference Table
| Character | Decimal Code | Hexadecimal Value |
|---|---|---|
| A | 65 | 41 |
| a | 97 | 61 |
| B | 66 | 42 |
| b | 98 | 62 |
| 0 | 48 | 30 |
| 9 | 57 | 39 |
| Space ( ) | 32 | 20 |