Hex Encoder
Convert text and data to hexadecimal — paste, encode, and copy instantly.
Hex output will appear here...About Hex Encoder
Hex Encoder is a free online tool that converts text, binary, decimal, or Base64 data into hexadecimal (base-16) representation. Each byte of your input is expressed as a two-digit hex value using the digits 0-9 and letters A-F. The result is a compact, unambiguous notation used everywhere from network packet dumps and memory debuggers to color codes and cryptographic key material.
The tool accepts four input types: plain UTF-8 text (each character is encoded to its UTF-8 byte sequence), space-separated binary groups (e.g., 01001000 01100101), space-separated decimal byte values (0-255), and standard Base64 strings. Output can be formatted as a plain continuous hex string, 0x-prefixed pairs, space-separated pairs, or colon-separated pairs — matching whatever format your target system or specification requires. You can also switch between lowercase and uppercase hex digits with a single click.
Every conversion runs entirely in your browser with no server calls. Your data — whether it is source code, API keys, binary payloads, or any other sensitive content — never leaves your machine. There are no file-size limits, no account requirements, and no cost.
Key Features
Four input types in one tool
Switch between Text (UTF-8), Binary (space-separated 8-bit groups), Decimal (byte values 0-255), and Base64 without leaving the page or copying data to a separate converter.
Four output formats
Generate plain hex (48656c6c6f), 0x-prefixed (0x48 0x65 0x6c), spaced (48 65 6c), or colon-separated (48:65:6c) notation to match the convention your codebase, protocol, or tool expects.
Uppercase and lowercase toggle
Switch hex digits between lowercase (a-f) and uppercase (A-F) instantly. Some systems and style guides require a specific case; this option removes the need for a post-processing step.
Accurate UTF-8 byte encoding
Text input is encoded through the browser TextEncoder API, so multi-byte characters such as accented letters, emoji, and CJK scripts are encoded to the correct UTF-8 byte sequence rather than guessed.
Client-side and private
Encoding runs in the browser with no network requests. Paste API secrets, tokens, or internal data without risk of it being logged or intercepted on a server.
One-click copy and clear
Copy the hex output to the clipboard instantly or clear both panes with a single button — no keyboard shortcuts to memorize.
How to Use
Enter Data
Type or paste your text, binary, decimal, or Base64 data into the input area.
Choose Format
Select input type, output format (plain, 0x prefixed, spaced, colon-separated), and case preference.
Encode & Copy
Click "Encode" to convert to hexadecimal, then copy the result.
Example
Plain UTF-8 text is encoded byte-by-byte into hex pairs. "Hello" has five ASCII characters, so the output is five two-digit hex values.
Hello 48656c6c6f Common Use Cases
- arrow_circle_right
Inspecting byte sequences in protocols
When writing or debugging a network protocol, binary file format, or firmware image, you need to see the exact byte values of your strings. Paste the relevant text and check the hex output against the specification without firing up a hex editor or debugger.
- arrow_circle_right
Embedding data literals in source code
Languages like C, Python, and Go let you write byte literals as hex (e.g., \x48\x65\x6c). Paste a string or a Base64-encoded blob and copy the spaced or 0x-prefixed output directly into your array or buffer initializer.
- arrow_circle_right
Verifying encoding of non-ASCII text
UTF-8 encodes characters outside ASCII as multi-byte sequences. Use this tool to confirm that an accented character, emoji, or CJK glyph produces the byte sequence your parser expects, without guessing from a code-point table.
- arrow_circle_right
Converting decimal byte arrays to hex
Cryptographic libraries and packet-analysis tools sometimes output decimal byte lists. Paste the space-separated decimal values (e.g., "72 101 108") and get the equivalent hex notation for use in scripts, documentation, or comparisons.
- arrow_circle_right
Cross-checking Base64 payloads at the byte level
JWT headers, certificate fingerprints, and binary attachments often travel as Base64. Select the Base64 input type, paste the encoded string, and read the underlying hex bytes to verify checksums or spot unexpected byte values.