Tools

Home
Text to BinaryBase64 Encode/DecodeHash GeneratorUTF-8 Encode/DecodeURL Encode/Decode

String to Hex Converter

Convert text strings to hexadecimal representation and hex back to string. Supports UTF-8, ASCII, and Latin-1 encodings.

Your files never leave your browser
INPUT (STRING)0 chars, 0 bytes
OUTPUT (HEX)0 chars
Ready·Encoding: UTF-8

Quick Reference: Common Hex Values

▼

Drop in any text string and get its hex byte values instantly — or paste hex and decode it back to readable characters. Supports UTF-8, ASCII, and Latin-1 with five output formats including 0x-prefix and \x escapes. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste Text or Hex
→
Encode Each Byte
→
Formatted Output

Each character in your string gets encoded into bytes using the selected character set (UTF-8, ASCII, or Latin-1). Those bytes are then written out as two-digit hexadecimal values in whatever format you pick. Going the other direction, the tool parses hex pairs back into byte values and decodes them into readable text. The hex dump view adds byte offsets and an ASCII sidebar — same layout you'd see in xxd or a hex editor.

Examples

Debugging an API Response Header

An HTTP header value looks garbled. Convert it to hex to check for hidden control characters.

INPUT
Hello\r\nWorld
OUTPUT
48 65 6C 6C 6F 0D 0A 57 6F 72 6C 64

Embedding a Token as Hex in Source Code

You need to write a byte array literal in C or Python, so the string must be in \x format.

INPUT
myToken_2024
OUTPUT (\x format)
\x6D\x79\x54\x6F\x6B\x65\x6E\x5F\x32\x30\x32\x34

Decoding Hex from a Bluetooth Packet Capture

A BLE sniffer dumps device names as raw hex. You want to see what the device is actually called.

INPUT (Hex to String mode)
4D 79 20 53 70 65 61 6B 65 72
OUTPUT
My Speaker

Who Uses This

👨‍💻 Developers

Building byte-level protocol handlers or encoding strings for config files that need hex escape sequences.

🔍 Network Engineers

Reading packet captures and translating hex payloads back into human-readable text.

🛡️ Security Analysts

Inspecting suspicious strings in malware samples or encoded payloads during incident response.

🎓 Students

Learning how ASCII and UTF-8 encoding actually map characters to bytes in computer science courses.

Common Mistakes

Using the wrong encoding for non-ASCII text

If you convert an emoji or accented character with ASCII selected, the tool can't represent it — ASCII only covers 0–7F. Switch to UTF-8 for anything beyond basic English letters and symbols.

Pasting hex with mixed delimiters

Copying "0x48 65:6C" into the hex input confuses the parser because it mixes 0x prefixes, spaces, and colons. Stick to one format. Clean up your hex string before converting.

Expecting raw binary data to round-trip as text

Binary data often contains bytes that aren’t valid in any text encoding. Converting hex like "FF FE 00" to a string and back won't always give you the same hex — the decoder may insert replacement characters. For binary inspection, use the hex dump view instead.

Technical Details

Frequently Asked Questions

What is hexadecimal and why is it used for data?

Hex is base-16 — it uses 0–9 and A–F. Two hex digits map perfectly to one byte (8 bits), which makes it way more compact than binary and easier to read than raw decimal. That's why you see it everywhere: memory addresses, color codes, MAC addresses, packet dumps.

How do I convert hex back to a readable string?

Click the "Hex to String" toggle at the top of the tool. Paste your hex values into the input panel — spaces, colons, or 0x prefixes are all fine. Hit Convert (or turn on Live mode) and the decoded text appears on the right.

Is there a size limit for the input?

No hard limit — it depends on your browser's memory. In practice, strings up to several megabytes convert without issues. If you're working with very large files, though, a desktop hex editor would be faster.

What's the difference between UTF-8 and ASCII in this tool?

ASCII only handles characters 0–127, so it covers English letters, digits, and basic punctuation. UTF-8 is a superset that encodes the full Unicode range using 1 to 4 bytes per character. Pick ASCII when you know your data is pure English; go with UTF-8 for anything else.

Can I use this to decode hex color codes like #FF5733?

Not directly. Hex color codes represent RGB values, not text. FF5733 means red=255, green=87, blue=51 — that's a color, not a string. If you convert it here, you'll get gibberish text because the tool treats it as encoded characters. Use a color picker tool for that.

Share: