File to Byte — convert any file to bytes / hex

File to Byte reads a file straight into memory in your browser and renders it as a raw byte array or a classic hex + ASCII dump. Nothing is uploaded anywhere; the conversion happens entirely on the client with the FileReader API.

Extension does not matter. .exe, .png, .rar, .ewffbfew, files with no extension at all — every file is just bytes, and every file is accepted.

mode    client-side, no server round-trip
output  hex dump  /  byte array (dec)  /  0x hex literals

Convert

drop a file here, or click to browse
any file, any extension — read locally, never uploaded
name
size
type
extension
no file loaded — output will render here

Features

Any file, any extension
There is no extension whitelist. .exe, .png, .rar, files with a made-up or missing extension — the browser reads raw bytes with FileReader.readAsArrayBuffer, so the extension is never even checked.
Hex dump view
Standard offset / hex / ASCII layout, 16 bytes per row, non-printable bytes shown as . in the ASCII column — the same layout used by tools like hexdump -C.
Byte array view
Renders the file as a comma-separated decimal byte array (0-255 per byte), ready to paste into source code or a test fixture.
0x hex literal view
Renders every byte as a C-style hex literal (0x00, 0xFF, 0xB3, 0x03, ...), ready to paste straight into C, C++, Java, or Python source code.
Loading indicator for large files
Large files (tens or hundreds of MB) take time to read. While that happens, a Loading... screen with a live progress bar and randomized scrambling characters is shown, then swaps to the finished output the instant conversion completes.
Runs entirely client-side
The file never leaves your machine. Conversion happens in JavaScript in the current tab; there is no upload endpoint and no network request tied to file contents.
Copy and download
Copy the active view to the clipboard, or download it as a .txt file, in one click.
Large-file guard
Files above 2 MB are truncated in the dump to keep the browser tab responsive; the byte count shown always reflects the real file size.

FAQ

Is my file uploaded anywhere?
No. The file is read locally through the browser's File API and never leaves your device.
Does the file extension matter?
No. Every file is treated as a raw byte stream regardless of its extension, or if it has none at all.
Is there a file size limit?
Any file can be loaded, but the on-screen dump is capped at the first 2 MB for performance; the reported file size is always exact.
Why does it show a Loading screen?
Reading a very large file (for example 100 MB) into memory and rendering it as text takes a moment. A progress bar and scrambling placeholder characters are shown during that time, then the real hex dump / byte array / 0x view replaces them automatically once conversion finishes.