Number Converters · Browser · Free

Text String to Hex Code Converter

Enter text or hexadecimal bytes, choose an encoding and delimiter, and press Convert. Use Swap conversion to switch direction, Open File or drag and drop to load text files, Sample for quick examples, View selection to inspect matching bytes, Copy for the clipboard, and Save to download.

Text to hexadecimal bytes and reverse conversion

This converter encodes text into hexadecimal byte values and decodes hexadecimal bytes back into text. You can type or paste text into the input, open a local text file, or drag and drop a UTF-8 text file directly onto the editor.

The character encoding select includes ASCII, Unicode, UTF-8, UTF-16 little endian, UTF-16 big endian, and various international encodings. The delimiter select provides space, comma, none, or a user-defined delimiter string.

Press Convert to run the conversion. Use Swap conversion to flip direction between text-to-hex and hex-to-text with the current delimiter and encoding carried over. Sample loads an example string, View selection highlights matching bytes or characters for ASCII and Unicode, Copy copies the result, and Save downloads the output as a text file.

Hexadecimal byte value formula

Each character of the input is turned into its byte values, and every byte is shown in hexadecimal. The values are listed in the order the characters appear in your text, separated by the delimiter you chose.

The table gives the byte value for a handful of characters in hexadecimal: A is 41, B is 42, Z is 5A, a is 61, z is 7A, the digit 0 is 30, the digit 9 is 39, an exclamation mark is 21 and a question mark is 3F.

ASCII characters and their byte values
CharacterHexadecimal
A41
B42
Z5A
a61
b62
z7A
030
939
!21
?3F