Text To Hex Converter
Base32, Base58, Base85 And Bytes
This text to hex converter turns any text into hex, Base32, Base58, Base85, decimal bytes, octal bytes, code points or UTF-16 units, and turns them back into text. Everything runs in your browser. We upload nothing.
- FreePrice
- 8Formats
- NoneSign-up
- NoneUploads
Text To Hex Converter
Turn text into hex, Base32, Base58, Base85, bytes or code points
- Characters
- 0
- UTF-8 bytes
- 0
- Encoded length
- 0
Ready. Type some text to encode it.
What A Text To Hex Converter Does For You
Computers store text as numbers. Each character has a code, and each code takes one or more bytes. Sometimes you need to see those bytes.
A text to hex converter shows them. First, type or paste your text. Then pick a format. The bytes appear at once, and you copy them with one click.
Also, it works both ways. Paste hex, Base32 or a list of bytes, and the tool turns it back into text. So you can read a dump from a log, a packet or a database.
Everything runs in your browser. So your text never leaves your device.
How Text Becomes Bytes
Text is a list of characters. A computer first turns each character into a number, then into bytes. The usual way is UTF-8. In UTF-8, plain English letters take one byte, and most accented letters take two.
So the word Hi becomes the bytes 72 and 105, which is 48 69 in hex.
For more detail, see: RFC 4648, the Base16, Base32 and Base64 encodings.
Text To Hex
Hex writes each byte as two digits from 0 to 9 and a to f. Pick a separator, add a 0x before each byte if you like, and choose capital letters. Then copy the result.

For example, Hello becomes 48 65 6c 6c 6f.
Hex To Text
First, switch the direction to Code to text and paste your hex. The tool ignores spaces, commas, colons and prefixes such as 0x. Then it joins the digits in pairs and reads the bytes as UTF-8.
Base32
Base32 uses 32 safe characters: the capital letters A to Z and the digits 2 to 7. It follows the standard in RFC 4648. People use it for one time password keys and for names that must not depend on case.
Also, the tool adds equals signs as padding, unless you turn them off.
Base58
Base58 drops the look alike characters 0, O, I and l. So it is easier to read and to type. Also, bitcoin addresses and many short ids use it. Leading zero bytes become leading ones.
Base85
Base85, also called Ascii85, packs four bytes into five characters. So it is shorter than Base64. PDF and PostScript files use it.
Then a group of four zero bytes becomes a single letter z. Also, you can wrap the result in the Adobe marks.
Decimal And Octal Bytes
Each byte can also show as a decimal number from 0 to 255, or as an octal number from 000 to 377. So Hi! becomes 72 105 33 in decimal. So use it for lookup tables and old protocols.
Unicode Code Points
A code point is the number that Unicode gives each character. Then the tool writes it as U+0041. It also offers the escape form that JavaScript uses.
For example, a smiling face is one code point, U+1F600, but it takes four bytes in UTF-8.
UTF-16 Code Units
JavaScript and Windows store text as UTF-16 code units. Each unit is a 16 bit number. So an emoji takes two units, called a surrogate pair. The tool lists the units in hex, so you can see the pair.
Characters Versus Bytes
The stats show three numbers. Characters counts what you see. UTF-8 bytes counts the storage. Encoded length counts the characters of the result. So a short emoji text can have more bytes than characters.
Invalid Input
If the text holds a wrong character, the tool says so. An odd number of hex digits also gives an error, because a byte needs two.
If the bytes do not form valid UTF-8, the tool still shows the text. Then it warns you about the replacement signs.
Common Uses
Developers use hex to read network data, check file headers, debug encodings and write test data. Also, Base32 and Base58 show up in keys and ids. So one tool saves a lot of switching.
Safe By Design
First, the tool works in your browser. It sends nothing, and it stores nothing. So your text stays yours.
Using The Converter, Step By Step
Four steps take you from text to bytes.
- 1
Pick a direction
Choose Text to code, or Code to text.
- 2
Pick a format
Choose hex, Base32, Base58, Base85, bytes or code points.
- 3
Type or paste
The result appears as you type.
- 4
Copy or save
Copy the result, save it as a file, or swap sides to check it.
What Sets This Converter Apart
It knows eight formats, it speaks UTF-8, and it keeps your text private.
Eight formats
Hex, Base32, Base58, Base85, decimal, octal, code points and UTF-16.
Both directions
Encode text and decode it again with the same settings.
True UTF-8
Accents, symbols and emoji turn into the right bytes.
Tidy options
Pick the separator, the case, the prefix and the padding.
Byte counts
See the characters, the UTF-8 bytes and the encoded length.
Nothing leaves your tab
Your browser does the work. We never see your text.
Habits For Working With Encoded Text
A few habits keep your bytes honest.
- Know the encoding. Hex of UTF-8 differs from hex of UTF-16, so name the one you use.
- Keep the separator steady. Use one separator through a whole file.
- Match the case. Hex is case free, but Base58 is not. Copy it as it stands.
- Mind the padding. Some Base32 readers need the equals signs, and some do not.
- Check the round trip. Use Swap sides to be sure the text comes back unchanged.
- Watch accents. An accented letter takes two bytes in UTF-8.
- Do not call it encryption. Encoding hides nothing. Anyone can decode it.
- Mind whitespace. A stray space or line break changes the bytes.
- Test with a sample. Try the sample before you trust a long input.
- Keep secrets out. Do not paste live keys into any online tool.
- Save long output. Download a file instead of copying thousands of bytes.
Common Encoding Mistakes This Tool Helps You Avoid
Each of these quietly garbles text.
Mixing up encodings
UTF-8 bytes read as another encoding show odd symbols.
Odd digit counts
A byte needs two hex digits, so an odd count means a lost digit.
Lost padding
A Base32 string cut short no longer decodes.
Look alike letters
Base58 has no 0, O, I or l, so such letters signal a typo.
Counting characters as bytes
An emoji is one character and four bytes.
Treating encoding as a lock
Hex and Base32 only change the form of the data.
Questions People Ask About Text To Hex
Is this text to hex converter free?
Yes. It costs nothing, needs no account and has no limits. It runs in your browser, so we have no server cost to pass on.
Does my text leave my device?
No. Your browser does the converting. Nothing reaches this site, and we keep nothing.
How do I convert text to hex?
Pick Text to code and Hex, then type or paste your text. The hex bytes appear as you type.
How do I convert hex to text?
Switch the direction to Code to text, pick Hex, and paste your hex. The tool reads the bytes as UTF-8 and shows the text.
What is hex?
It is base sixteen. It writes each byte as two digits from 0 to 9 and a to f, so 255 becomes ff.
What is UTF-8?
It is the usual way to turn text into bytes. It uses one byte for plain English letters and up to four for other characters.
Why does a letter like é give two bytes?
UTF-8 uses two bytes for accented letters. So é becomes c3 a9 in hex.
Can I change the separator?
Yes. Pick a space, nothing, a comma or a new line in the Separator box.
How do I add 0x before each byte?
Tick Add 0x before each byte. Pick a comma as the separator to get a list ready for code.
Can I get capital letters?
Yes. Tick Capital letters for hex or UTF-16, and the digits a to f become A to F.
What is Base32?
A way to write bytes with 32 characters: A to Z and 2 to 7. It is common in one time password keys.
What is Base58?
Like Base64, but without the look alike characters 0, O, I and l, and without plus and slash. Bitcoin addresses use it.
What is Base85?
Also called Ascii85. It packs four bytes into five characters, so it is shorter than Base64.
Why does Base32 end with equals signs?
They pad the text to a multiple of eight characters. Untick Pad with equals signs to drop them.
What are decimal and octal bytes?
The same bytes written as numbers from 0 to 255 in decimal, or from 000 to 377 in octal.
What is a Unicode code point?
It is the number Unicode gives to a character, written like U+0041. The tool also offers an escape style.
What are UTF-16 code units?
They are the 16 bit numbers that JavaScript and Windows use to store text. An emoji takes two of them.
How many bytes is an emoji?
Four bytes in UTF-8, and two code units in UTF-16.
Why does it say the length is odd?
Hex needs two digits for each byte, so an odd count means a digit is missing. UTF-16 needs four digits per unit.
What if the bytes are not valid UTF-8?
The tool still shows the text. It marks the broken bytes with the replacement sign and warns you.
Is hex or Base32 a form of encryption?
No. They only change how the data is written. Anyone can decode them.
What does Swap sides do?
It moves the result into the left box and flips the direction, so you can check a round trip.
Does it work on a phone?
Yes. The panels stack and the boxes scroll. So you can convert text on the go.
Handy Companions For Encoding Work
Converting is one step. These three tools help with the rest.
Base64 Encoder
Encode and decode text and files in Base64.
Open tool →Binary Translator
Turn text into ones and zeros and back.
Open tool →HTML Entity Encoder
Encode and decode named and numeric HTML entities.
Open tool →
Ready To Convert Some Text?
Type your text, pick a format, and copy the result. The converter is free, needs no account, and keeps every character on your device.