Using this text-to-code converter is straightforwardâno tech expertise needed! Just follow these 3 simple steps to turn your text into hex, binary, decimal, octal, or Base64, whether youâre working with a quick phrase or a whole file.
Hereâs the "behind-the-scenes" stuff to help you understand how the conversion worksâand why we made the choices we did. You donât need to know this to use the tool, but itâs handy if youâre curious or troubleshooting.
All conversions use UTF-8 encoding by defaultâhereâs why that matters:
Hereâs exactly how each output format is structuredâno surprises:
Weâve built in checks to avoid common issues:
Seeing is believing! Check out these real-world examples to see how different texts convert to each format. Weâve included common use casesâfrom simple English to emojis and non-English text.
Input string:
"Hello World"
Hexadecimal (spaced, uppercase):
48 65 6C 6C 6F 20 57 6F 72 6C 64
Binary (spaced):
01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100
Decimal (spaced):
72 101 108 108 111 32 87 111 114 108 100
Input string:
"Hi! đ"
Hexadecimal (spaced, lowercase):
48 69 21 20 f0 9f 98 8a
Base64:
SGkhIPCfkqE=
Note:
The emoji "đ" uses 4 bytes (f0 9f 98 8a) in UTF-8âhence the longer hex output!
Input string:
"ä˝ ĺĽ˝, World!"
Hexadecimal (0x prefix):
0xE4 0xBD 0xA0 0xE5 0xA5 0xBD 0x2C 0x20 0x57 0x6F 0x72 0x6C 0x64 0x21
Decimal:
228 189 160 229 165 189 44 32 87 111 114 108 100 33
Note:
Chinese characters "ä˝ " (E4 BD A0) and "弽" (E5 A5 BD) each use 3 bytes in UTF-8.
Input string:
"Test"
Options Used:
1. Hex (uppercase, no space) 2. Hex (lowercase, spaced) 3. Hex (0x prefix)
Output 1:
54657374
Output 2:
54 65 73 74
Output 3:
0x54 0x65 0x73 0x74
Great question! Emojis are "supplementary characters" in Unicodeâthey donât fit in the 1-byte range (0-127) that basic English uses. UTF-8 uses 4 bytes for emojis to cover all possible Unicode symbols. Itâs normal, and our tool handles it automatically!
9 times out of 10, itâs an encoding issue. Make sure your input text uses UTF-8 (most modern apps like Word, Notepad, or Slack use UTF-8 by default). If you copied text from a legacy document (old Word files, for example), it might use ISO-8859-1âtry re-saving the file as UTF-8 first, then upload again.
Right now, this tool only goes from text to code (hex, binary, etc.). If you need the reverse (e.g., hex to text), we have a separate "Code to Text Converter"âlook for the link at the bottom of the page!
For pasted text, no hard limitâyou can paste as much as you want (though very long text might take a second to process). For files, we recommend keeping it under 5MB to avoid slowdowns. If you have a 10MB file, split it into two smaller filesâworks like a charm!
Base64 is better for sending text over the internet. Hex uses 2 characters per byte, while Base64 uses ~1.33 characters per byteâso itâs more compact. Plus, Base64 uses web-safe characters (no + or / in some versions) that work in URLs and emails, whereas hex can have issues with certain tools.