File to Hex & Hex to File Converter
Encode file bytes as Hex or restore a binary file from Hex.
How to use
Decoding 00 ff 80 01 yields four bytes, including the leading zero byte. Use two Hex digits per byte. Whitespace is accepted.
FAQ
Does encoding a file as Hex require an upload?
Your browser reads the file bytes and creates the Hex text locally. When decoding, it creates a local download containing the bytes represented by that text.
What is supported?
Select a file up to 8 MiB. In Encode mode, Download saves the Hex text. In Decode mode it saves the decoded bytes.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Encode and decode fixed zero/high-bit binary bytes; reject odd-length hex. Download regressions distinguish encoded Hex text from decoded raw bytes and exercise the inactive source-encoding selector.
- Comparison reference
- Explicit 00ff8001 byte assertion and local inverse; no second implementation in this test.
- Verification scope
- Covers fixed binary bytes, the local inverse, odd-digit rejection and the decoded and encoded download content.
Test source and cases (select a file to read it)
-
completion-tools.test.js
- file-hex: binary zeros and high bytes survive encoding and decoding
- Hex encoding explicitly downloads encoded text while decoding downloads original bytes
- File decoders treat input as encoded text regardless of the source byte selector
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.