🍎 BinHex Encoder

🔧
🍎
📝
⚙️
📤
📋
Filename:
Type: ()
Creator: ()
Flags:
Data Fork Size:
Resource Fork Size:
CRC Status:
ℹ️
Character Set: !"#$%&'()*+,-012345689@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdefhijklmpqr (64 chars)
Structure: Header + Data Fork + Resource Fork + CRC
Compression: RLE (Run-Length Encoding) applied before conversion
Example Header:
(This file must be converted with BinHex 4.0)
:"FileName.txt",TYPE,CREATOR,FLAGS,DATA,RESOURCE:
Common File Types:
TEXT=Text, APPL=Application, PICT=Picture, BINA=Binary
⚠️

ℹ️ About BinHex Encoder/Decoder

BinHex, usually seen as BinHex 4.0 or .hqx, is a legacy Macintosh binary-to-text format for moving Mac files through email, Usenet, FTP, bulletin boards, and other systems that were safer with printable text than raw binary data. A BinHex file wraps Macintosh file metadata with encoded content so classic Mac systems can recover the original filename, file type, creator code, and data fork after transfer.

BinHex was most useful when a file needed to survive non-Mac filesystems or text-oriented mail gateways. Common uses include distributing classic Macintosh software, sending SimpleText or application files by email, preserving type and creator codes when moving files through Windows or Unix hosts, decoding old .hqx downloads from software archives, and preparing files for emulators or vintage Mac hardware.

Technical structure:

  • Starts with the BinHex 4.0 marker line and then a colon-framed encoded stream.
  • Uses a 64-character alphabet where each encoded character represents 6 bits of data.
  • Stores the Macintosh filename, 4-character file type, 4-character creator code, Finder flags, data fork length, and resource fork length.
  • Includes CRC-16 checksums for the header, data fork, and resource fork in full BinHex 4.0 files.
  • Classic BinHex 4.0 streams may use run-length encoding before the printable-character conversion.

Example: encoding text such as Hello from Macintosh! with filename Document.txt, type TEXT, and creator ttxt produces BinHex text beginning with (This file must be converted with BinHex 4.0) and a :...: payload. Decoding a valid BinHex payload extracts the stored name, type, creator, and data fork bytes.

Limitations and compatibility:

  • BinHex is a legacy interchange format, not encryption, compression for modern archives, or a replacement for ZIP, disk images, AppleDouble, or MacBinary.
  • This page is best for BinHex-style text/data payloads and metadata inspection. It does not recreate a complete classic HFS file with arbitrary resource fork content.
  • Very old or hand-edited .hqx files can fail if the colon frame, character alphabet, checksums, or resource-fork layout differs from the supported form.
  • For preservation work, keep the original archive or disk image alongside decoded output so resource forks, Finder comments, custom icons, and file dates are not lost.

Privacy note: the interactive web tool performs BinHex conversion in your browser. If you use the public API endpoint instead, the submitted payload is sent to the server to process the response.

References: RFC 1741 documents the MIME type for BinHex 4.0 files, and RFC 1740 explains the Macintosh data fork/resource fork context behind Mac file transfer formats.

API Usage Example:

POST /api/tools/encoding-decoding/binhex
Content-Type: application/json

{
    "text": "Hello from Macintosh!",
    "operation": "encode",
    "filename": "Document.txt",
    "type": "TEXT",
    "creator": "ttxt"
}
Ready