Hex encode
Hex encode. Runs on your device, nothing is uploaded.
Runs on your device. The file is never uploaded.
Hex encode prints every byte of a file as two lowercase hexadecimal digits in one unbroken string, with no separators, no 0x and no line breaks. Text is read as UTF-8 bytes first, so an emoji becomes eight digits. There are no options, so reach for Hexdump when you want offsets and an ASCII column.
Questions
What exactly does the output look like?
Lowercase hexadecimal, two characters per byte, run together with no spaces, no 0x prefix and no line breaks. A three-byte file gives six characters. There are no options, so the format is the same every time you run it, which makes the output easy to compare or diff.
How do I turn the hex back into a file?
Use the From hexdump tool. It picks the hex pairs out of whatever text you give it and writes the bytes to a .bin file, and it accepts a plain unbroken hex string as well as a full offset-and-ASCII dump. That is the return trip for this tool.
How is this different from the Hexdump tool?
Hexdump is for reading; this is for copying. Hexdump prints an offset column, spaced hex and an ASCII column at 8, 16 or 32 bytes per line, like hexdump -C. This tool prints one long string of hex digits and nothing else, which is what you want when pasting a value into code or a config file.
Why is my text longer than I expected?
Text is encoded as UTF-8 bytes, and hex doubles them. An ASCII character is one byte and two hex digits; an accented letter or an emoji is two to four bytes, so four to eight digits. The whole file is read, including any trailing newline your editor saved.
Is hex a way of hiding data?
No. It is a direct one-to-one rewrite of the bytes, and anyone can read it back with a single command in any language or with the From hexdump tool here. It makes bytes printable so you can paste, diff or inspect them; it does not make them private in any way.
Does the file leave my device?
No. It is converted in a Web Worker in this tab, so nothing is uploaded and the page keeps working after you go offline. Output past the first 100,000 characters is hidden in the panel to keep the page responsive, but the Copy button still copies the whole string.