Hex to Text Converter
Decode hex byte strings to text and encode text back to hex — tolerates 0x prefixes, mixed separators and hexdump dumps.
Hex input
Decoded text
Paste hex bytes to decode them
Results update as you type. Nothing leaves your browser.
Details
This tool converts hex byte strings into ASCII/UTF-8 text and encodes text back into hex. Unlike stricter converters it eats the messy formatting real protocol dumps contain: 0x prefixes, spaces, colons, commas, dashes, newlines, and even hexdump -C output with address columns and |ascii| rails. Decoding is available in UTF-8 (with byte-level replacement diagnostics for ill-formed sequences) and Latin-1 (byte-for-byte). Output hex can be formatted with lowercase or uppercase letters and space, colon, comma or no separators. Everything runs locally in your browser — dumps often contain sensitive payloads and are never uploaded.
More examples
Decoding a simple byte string
Input: 48 65 6c 6c 6f
Output: HelloEach pair of hex digits is one byte; UTF-8 decoding turns 48 65 6c 6c 6f into the word "Hello" live as you type.
Eating messy dump formatting
Input: 0x48,0x69
Output: Hi0x prefixes, commas, colons, dashes and newlines are all stripped before the bytes are decoded, so protocol traces paste cleanly.
Decoding a hexdump with offsets
Input: 00000000 48 65 6c 6c 6f |Hello|
Output: Hello (with "Strip hexdump offsets" on)The address column and the |ascii| rail are dropped, and * repetition lines are expanded, so hexdump -C output decodes exactly.
Encoding text as UTF-8 hex
Input: Zürich
Output: 5a c3 bc 72 69 63 68ü is two UTF-8 bytes (c3 bc), while Latin-1 mode would encode it as the single byte fc — pick the encoding your target format expects.
Examples
UART log line
0x48,0x69HiPrefixes and commas are stripped automatically — paste a raw log line and read it without pre-cleaning.
hexdump -C round-trip
00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 |Hello World!|Hello World!With offset stripping on, the address, the grouping gap and the ASCII rail disappear; the trailing offset-only line is dropped too.
Non-UTF-8 byte
e9 (UTF-8 mode → U+FFFD, 1 replaced byte)é (Latin-1 mode)The stats bar tells you the byte was ill-formed in UTF-8; switching to Latin-1 shows the single-byte character legacy data actually meant.
About this tool
The Hex to Text Converter turns hex byte strings into readable text and encodes text back into hex, with a live preview that updates on every keystroke. Its core loop is simple — sanitize the input into a byte array, then decode with UTF-8 or Latin-1 (or the reverse when encoding) — but the tool is built for the messy inputs real debugging produces: 0x and 0X prefixes, spaces, colons, commas, dashes, mixed letter case, and line breaks are all tolerated and stripped before conversion.
Protocol dumps rarely arrive clean, so a hexdump mode drops the address column at the start of each line and the |ascii| rail at the end, and expands the * repetition lines that hexdump -C prints for repeated rows. Odd-length hex strings are handled explicitly: a lone nibble gets a leading zero ("4" reads as byte 0x04) with a visible notice, never a silent guess. If the input contains a character that isn't hex at all, the error points at its exact position instead of failing vaguely.
Decoding is byte-honest. In UTF-8 mode, ill-formed byte sequences become U+FFFD replacement characters, and the stats bar counts exactly how many bytes were ill-formed and in how many sequences — for example c3 28 reports one replaced byte, while e6 84 2c reports two bytes in one truncated sequence. Switching to Latin-1 (ISO-8859-1) decodes every byte as-is, so e9 shows é where UTF-8 saw an error. On the encode side, UTF-8 produces the standard multi-byte sequences (Zürich → 5a c3 bc 72 69 63 68), while Latin-1 flags characters outside U+0000–U+00FF instead of dropping them silently.
Everything runs in your browser: no upload, no telemetry, no server round-trip — a deliberate choice, because wire dumps and serial logs often contain sensitive payloads. Output can be copied as-is, downloaded as text, or (when decoding) saved as raw bytes in a .bin file. If you need strict 0/1 binary strings or single-number base conversion, the Binary Text Translator and Number Base Converter are the right tools instead.
What this tool does not do
- Converts hex byte strings, not raw binary files — for raw binary use the Binary Text Translator or a command-line hexdump tool.
- Decoding supports UTF-8 and Latin-1 only; cp1252, Shift-JIS and other legacy encodings are not available (0x80–0x9F decode as control characters, not typographic quotes).
- Inputs decode up to 2 MB of payload bytes; larger dumps should be split or processed with local tooling.
How to use this tool
Pick a direction
Choose Hex → text or Text → hex at the top. The swap button moves the output back into the input and flips the direction, so a round-trip never loses your data.
Paste or type your input
Hex mode tolerates 0x prefixes, spaces, colons, commas, dashes and newlines. For hexdump -C output, turn on "Strip hexdump offsets" so address columns and |ascii| rails are removed.
Choose the encoding
UTF-8 is correct for modern text and reports ill-formed bytes as replacement characters with exact counts. Latin-1 decodes byte-for-byte, which is right for legacy single-byte data.
Read the stats and copy out
The stats bar shows byte count, replaced bytes, invalid sequences and control bytes. Copy the result, download it as text, or save decoded bytes as a .bin file.
Use cases
Reading protocol and serial dumps
Paste UART, Modbus or wire-protocol traces straight from a terminal or log file and get text plus byte-level diagnostics without cleaning the formatting first.
Building config values
Encode text to hex with the exact case and separator a config file expects — uppercase colon-separated pairs, comma lists, or continuous strings.
Learning byte encoding
See how ü becomes two UTF-8 bytes or one Latin-1 byte, how emoji expand to four bytes, and how ill-formed sequences are counted — with instant feedback per keystroke.
Accepted hex input and output formats
| Format | Behaviour |
|---|---|
| Spaced pairs | 48 65 6c 6c 6f — the canonical form |
| 0x prefixes | 0x48,0x69 — prefixes stripped wherever they appear |
| Colon / comma / dash separators | 48:65:6c, 48,65,6c, 48-65-6c — all one byte stream |
| Continuous | 48656c6c6f — parsed as pairs with no separators |
| hexdump -C | Address column and |ascii| rail stripped; * lines expand to the previous row's bytes |
| Odd nibble | "4" → byte 0x04 with a visible leading-zero notice |
| Hex output | Lower- or uppercase, separated by none, space, colon or comma |
UTF-8 decoding follows the WHATWG encoding standard: one U+FFFD per maximal ill-formed subpart, with per-byte counts in the stats bar.
Common mistakes
Mistake:Reading replacement characters as data corruption.
Fix:U+FFFD in UTF-8 mode means those bytes were not valid UTF-8 — check the stats bar, then try Latin-1, which maps every byte directly to a character.
Mistake:Assuming Latin-1 equals Windows-1252.
Fix:They agree except for 0x80–0x9F, where cp1252 has typographic quotes and dashes. The tool decodes true ISO-8859-1; byte 0x93 shows as a control character, not a curly quote.
Mistake:Feeding raw binary files instead of hex text.
Fix:This tool converts hex byte strings. For raw 0/1 binary strings use the Binary Text Translator, and for converting whole files consider command-line tools such as xxd.
Frequently asked questions
Why does my hex show replacement characters?
A � (U+FFFD) means those bytes are not valid UTF-8. The decoder follows the WHATWG rules: each maximal ill-formed byte sequence becomes one replacement character, and the stats bar counts the exact number of ill-formed bytes and sequences — for example c3 28 reports 1 replaced byte, and e6 84 2c reports 2 bytes in 1 sequence. If the data is legacy single-byte text, switch the encoding to Latin-1 and the same bytes decode directly (e9 becomes é).
What's the difference between UTF-8 and Latin-1 decoding here?
UTF-8 is a multi-byte encoding: sequences like c3 bc decode to one character (ü), and ill-formed bytes become replacement characters with diagnostics. Latin-1 (ISO-8859-1) is a single-byte encoding: every byte maps one-to-one to a Unicode code point, so e9 is é and nothing is ever flagged invalid. Note that Latin-1 differs from Windows-1252 in the 0x80–0x9F range, where cp1252 has typographic quotes and dashes — this tool decodes true ISO-8859-1.
How do I remove offsets from a hexdump?
Turn on "Strip hexdump offsets". The tool then drops the leading address column of each line, the |ascii| rail at the end, and expands the * repetition lines hexdump -C prints for identical rows, leaving only the byte data. It also detects hexdump-shaped input automatically and offers the toggle, and it drops trailing offset-only lines such as 0000000c.
Can it handle odd-length hex strings?
Yes, explicitly. A string with an odd number of hex digits gets a leading zero, so "4" becomes byte 0x04 and "abc" becomes the bytes 0a bc. A visible notice tells you how many digits were read and that a leading zero was assumed — the conversion is never silently guessed.
Is the conversion done locally?
Entirely. Conversion runs in your browser tab using the standard encoding algorithms; nothing is uploaded, logged, or shared. That is deliberate: protocol dumps and serial logs often contain sensitive payloads such as tokens or personal data, and they never leave your device.
How large can my input be?
Up to 2 MB of payload bytes — that is what the byte counter measures, not the raw text length, so a hexdump file that doubles in size when rendered still fits. Above the cap the tool shows a clear message instead of freezing; split the dump or use local tooling such as xxd for bigger files.
References & standards
Related tools
Base32 Encoder / Decoder
Encode and decode Base32 (RFC 4648) with hex input mode and Crockford variant. Handles TOTP secrets. Runs in-browser.
Base58 Encoder / Decoder
Convert hex or text to Base58 and back, with Base58Check validation (version byte + checksum). IPFS CIDs too. In-browser.
Base64 Toolbox
Professional Base64 workspace for text, files and images with Base64URL, MIME, Data URI, strict validation, image preview and ready-to-use snippets.
BibTeX to JSON Converter
Parse .bib bibliographies into structured JSON with authors, months, macros and LaTeX cleanup, all in-browser.
C# to VB.NET Converter
Convert a subset of C# — classes, methods, variables, loops — into VB.NET
CSV Data Viewer
Paste CSV and inspect it as a sortable, searchable table with delimiter detection and inline export.