Hex and text converter
Encode text or file bytes as hex and Base64 of the same bytes, or decode plain hex to exact bytes.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Convert UTF-8 text or any file into lowercase hexadecimal byte pairs and Base64 of the same bytes. Decode plain hex back to exact bytes, with a text preview when the result is readable UTF-8.
How to use this tool
- Choose Encode or Decode, then choose pasted text or a file.
- For encoding, enter UTF-8 text or select any file. For decoding, paste plain hex byte pairs or choose a UTF-8 .txt or .hex file.
- Convert, inspect the hex and same-byte Base64, then copy or download either result; decoding also preserves the original bytes.
Supported inputs and limits
Paste up to 1 MiB of text or select one file up to 10 MiB. Hex input files must be UTF-8 text.
Use an even number of hex digits (0–9, A–F). ASCII whitespace is ignored. Offset columns, 0x prefixes and Intel HEX records are not parsed.
Conversion runs in your browser. Hex encoding is not encryption.
Worked example
Example input
hello
Example options
{"mode":"encode"}Example output
68 65 6c 6c 6f
When something does not work
For odd-length or invalid hex, check that every byte has two digits and remove prefixes, offsets or other non-hex text. For binary output, download decoded.bin.
Frequently asked questions
Can I encode a binary file?
Yes. Choose File and Encode; its original bytes become lowercase hexadecimal pairs without text decoding.
What if decoded bytes are not text?
Download decoded.bin to retain the exact bytes. A text preview and decoded.txt appear only for readable UTF-8.
Does Base64 encode the hex characters?
No. ABC becomes hex 41 42 43 and Base64 QUJD from the same bytes. Pasted hex is decoded to bytes before Base64 encoding.
Is my input sent to a server?
No. Conversion happens in your browser. Save your output before closing the tab.
Documentation & further reading
Related tools
Base64 encode / decode
Encode or decode a snippet in a click.
URL encode / decode
Make those encoded characters readable again.
HTML entities
Convert between HTML entities and readable characters.
Unicode escape
Convert Unicode escapes into readable text and back.