Encoding Email Attachments - Encode, MIME, Binhex, Uuencode, AppleDouble | LivingInternet (2023)

Email attachments are encoded into text format before sending to ensure that control characters aren’t sent over the Internet.

The text of your email is stored as a series of readable alphanumeric characters. However, graphics, spreadsheets, video files, and even word processing documents can contain characters that may be stored in any of the 256 different combinations of 1’s and 0’s that make up an 8-bit byte. For example, three different byte combinations are shown below:


Most byte combinations are readable, such as the ones above, which represent the characters “B”, “m”, and “[” respectively. Something less than 100 of the 256 different possible byte combinations represent the standard alphanumeric characters including capital letters, lower case letters, numbers, punctuation marks, and other characters found on most computer keyboards — a list of codes for the standard ANSI characters can be found here. Extending beyond these old fashioned codes to keep information technology relevant in the modern world, the Unicode Consortium provides standards management of a consistent assignment of codes to a wide range of different characters across platforms, programs and languages.

However, many of the byte combinations that don’t represent readable characters are also used as instructions. If bytes containing these instruction codes were transmitted over the Internet, at a minimum the message would be broken into separate pieces, and at worse the instruction bytes would unintentionally tell the routers, switches, and other components that handled your email to take all sorts of unpredictable actions. In practice, the software systems — email client, operating system, networking software — between your email program and the Internet might catch any strange byte combinations before they hit the wider network, but since this is not a standard case they can produce unpredictable results. For example, this writer once sent an attachment with an experimental email system that didn’t encode attachments properly, resulting in the attachment being received as a zero-length file, truncated of all content by an intervening software layer who presumably stopped reading as soon as it saw an unconverted control character.

To protect against this problem, email programs routinely encode attached files before they are mailed with a program that filters out any non-readable bytes in a predictably reversible way. When the recipient’s email program receives the attachment and it is downloaded onto their machine, their email program decodes the attachment according to a standard procedure to reconstruct the original file.

Each encoded file includes an instruction that tells the email recipient what type of encoding program was used. There are a number of more or less standard encoding methods, including MIME, uuencode, BinHex, and AppleDouble (Mac version of MIME). Most email programs can decode most of the common standards. Two of the most common standards are described below:

  • MIME. The modern MIME encoding standard was first defined in paragraph 4.3 of RFC 989, updated by paragraph of RFC 1421, and has become the most common standard used for email encoding. MIME encodes a file into the following 64 alphanumeric characters:


  • Uuencode. Uuencode was one of the earliest encoding standards, first developed on the Unix BSD operating system. For many years there was no other standards document defining uuencode, which led to incompatible implementations until later versions were generally built to be compliant with the POSIX standard P1003.2b/D11, later IEEE Std 1003.1-2001. These later versions incorporated the MIME standard as an option. Most of the earlier versions encoded a file into the following 64 text characters:


You are sometimes given a choice in your email application settings for which encoding method your program should use. The best choice is usually MIME, which almost all email programs support. However, if somebody can’t read an attachment that you send them, try setting the encoding method to AppleDouble (same as MIME on a Mac), BinHex, or Uuencode in that order. Remember to change your settings back to MIME for sending to everyone else.

Resources. The following RFC provides a good description of some current encoding standards, including Base64 which is a common name for MIME.

  • RFC 3548; S. Josefsson, Ed.; The Base16, Base32, and Base64 Data Encodings; July 2003.


What encoding is used on email attachments? ›

With MIME, a message and all its attachments are encapsulated in a single multipart message, with base64 encoding used to convert binary into 7-bit ASCII text - or on some modern mail servers, optionally full 8-bit support via the 8BITMIME extension.

What is encoding in email? ›

Encoding standards tell the web browser or email application how to interpret the text characters in your HTML or the body of the email, such as an outbound email sent from the Salesforce application. The most popular character sets are UTF-8 and ISO-8859-1.

Should I use UTF-8 or UTF 16? ›

There is a simple rule of thumb on what Unicode Transformation Form (UTF) to use: - utf-8 for storage and comunication - utf-16 for data processing - you might go with utf-32 if most of the platform API you use is utf-32 (common in the UNIX world).

What does encode attachments in uuencode format mean? ›

The Unix-to-Unix encode (UUENCODE) format provided one of the earliest ways to add attachments to messages. In the UUENCODE format, attachments are appended to the message body after being encoded using the UUENCODE algorithm. Each attachment is prefixed with the file name and the encoding end string.

What are the four types of encoding? ›

There are four different types of encoding: visual, acoustic, semantic, and elaborative. Encoding is how the information is processed, stored, and retrieved; however, if it is encoded incorrectly, this can lead to a false memory.

What is encoding =' UTF-8? ›

UTF-8 is an encoding system for Unicode. It can translate any Unicode character to a matching unique binary string, and can also translate the binary string back to a Unicode character. This is the meaning of “UTF”, or “Unicode Transformation Format.”

How do I encode my email? ›

Simply type in the email address in the first textbox, hit encode, and it will return the complete HTML mailto: code encoded in hexadecimal values. Once encoded, you simply need to copy all the encoded content and paste it into web page. The encoded e-mail address will work on any web page with any browser.

How do I know if my file is UTF-16 or UTF-8? ›

There are a few options you can use: check the content-type to see if it includes a charset parameter which would indicate the encoding (e.g. Content-Type: text/plain; charset=utf-16 ); check if the uploaded data has a BOM (the first few bytes in the file, which would map to the unicode character U+FEFF - 2 bytes for ...

Is UTF-8 outdated? ›

utf8 is currently an alias for utf8mb3 , but it is now deprecated as such, and utf8 is expected subsequently to become a reference to utf8mb4 . Beginning with MySQL 8.0.

What is the difference between how UTF-8 UTF-16 and UTF-32 encode the Unicode table? ›

Efficiency. UTF-8 requires 8, 16, 24 or 32 bits (one to four bytes) to encode a Unicode character, UTF-16 requires either 16 or 32 bits to encode a character, and UTF-32 always requires 32 bits to encode a character.

What is MIME encoded files? ›

Multipurpose Internet Mail Extension or MIME is an internet standard, encoded file format used by email programs. The mime format contains 8-bit encoded data instead of commonly used 7-bit encoding for sending email. Thus, MIME files can contain file attachments and richer character sets other than ASCII.

How do I use uuencode in mailx? ›

Method 2 : -a switch in mailx command

The -a options is easier to use that the uuencode command. The above command will print a new blank line. Type the body of the message here and press [ctrl] + [d] to send. This will attach the file to the outbound email correctly with proper Content-Type and boundary headers.

Is uuencode still used? ›

Now, Uuencode is used to send binary files in ASCII format over the internet, via email, to post to USENET newsgroups, etc.

What are the 3 main ways information is encoded? ›

Summary. Memory encoding is a process by which the sensory information is modified and stored in the brain. The three major types of memory encoding include visual encoding, acoustic encoding, and semantic encoding.

What are the 3 types of character encoding? ›

There are three different Unicode character encodings: UTF-8, UTF-16 and UTF-32.

What is an example of encoding? ›

For example: if a child hears the sound /t/ and then writes the letter 't', this means they are able to encode this sound.

What is the difference between ISO 8859 1 and UTF-8? ›

UTF-8 is a multibyte encoding that can represent any Unicode character. ISO 8859-1 is a single-byte encoding that can represent the first 256 Unicode characters. Both encode ASCII exactly the same way.

What is the difference between UTF-8 and UTF-8 sig? ›

"sig" in "utf-8-sig" is the abbreviation of "signature" (i.e. signature utf-8 file). Using utf-8-sig to read a file will treat the BOM as metadata that explains how to interpret the file, instead of as part of the file contents.

What is the difference between UTF-8 and UTF-8? ›

UTF-8 is a valid IANA character set name, whereas utf8 is not. It's not even a valid alias. it refers to an implementation-provided locale, where settings of language, territory, and codeset are implementation-defined.

How do I send an encrypted email from my Iphone? ›

Use S/MIME to send and receive encrypted messages in the Mail app in iOS
  1. Open the Settings app.
  2. Choose Mail > Accounts.
  3. Select the account that has messages that you want to encrypt by default.
  4. Choose Account > Advanced > Encrypt by Default, then turn on Encrypt by Default.
17 Jun 2022

Do senders encode or decode? ›

The sender is the radio announcer who encodes a verbal message that is transmitted by a radio tower through electromagnetic waves (the channel) and eventually reaches your (the receiver's) ears via an antenna and speakers in order to be decoded.

How do I encrypt an email on Mac? ›

To send encrypted messages, the recipient's certificate must be in your keychain. In the Mail app on your Mac, choose File > New Message. Move the pointer over the From field, click the pop-up menu that appears, then choose the account for which you have a personal certificate in your keychain.

Are email attachments encrypted TLS? ›

Most major email providers have TLS encryption baked in, which protects your emails in transit or within the provider's servers. However, TLS doesn't provide complete security: emails outside the server or individual attachments aren't protected. The next level of protection is end-to-end encryption.

Are email addresses UTF-8? ›

International email, by contrast, uses Unicode characters encoded as UTF-8—allowing for the encoding the text of addresses in most of the world's writing systems.

What is the difference between ISO-8859-1 and UTF-8? ›

UTF-8 is a multibyte encoding that can represent any Unicode character. ISO 8859-1 is a single-byte encoding that can represent the first 256 Unicode characters. Both encode ASCII exactly the same way.

What is the best format to attach a document to an email? ›

The PDF file format is the best and most recommended way of sharing important documents, especially in professional settings where you need to share private and sensitive documents. Sending a PDF file as an attachment over email helps you: Deliver sensitive information and updates quickly and on time.

Should I use TLS or SSL for email? ›

TLS is the preferred encryption method because it's newer and offers more robust security features than SSL does. It's also a good idea to combine TLS-based email encryption with email authentication to ensure the integrity of email messages.

Is Apple Mail encrypted? ›

If you turn off iCloud Backup, a new key is generated on your device to protect future Messages in iCloud. This key is end-to-end encrypted between your devices and isnʼt stored by Apple. b. Advanced Data Protection: Messages in iCloud is always end-to-end encrypted.

How do I know if a file is UTF-8 or UTF-16? ›

There are a few options you can use: check the content-type to see if it includes a charset parameter which would indicate the encoding (e.g. Content-Type: text/plain; charset=utf-16 ); check if the uploaded data has a BOM (the first few bytes in the file, which would map to the unicode character U+FEFF - 2 bytes for ...

What is the difference between UTF-8 and UTF-32? ›

Efficiency. UTF-8 requires 8, 16, 24 or 32 bits (one to four bytes) to encode a Unicode character, UTF-16 requires either 16 or 32 bits to encode a character, and UTF-32 always requires 32 bits to encode a character.

Should I use UTF-8 or ISO 8859? ›

Most libraries that don't hold a lot of foreign language materials will be perfectly fine with ISO8859-1 ( also called Latin-1 or extended ASCII) encoding format, but if you do have a lot of foreign language materials you should choose UTF-8 since that provides access to a lot more foreign characters.

Which is better ASCII or UTF-8? ›

UTF-8 VS ASCII – What's the Difference? UTF-8 extends the ASCII character set to use 8-bit code points, which allows for up to 256 different characters. This means that UTF-8 can represent all of the printable ASCII characters, as well as the non-printable characters.

What is the most professional email format? ›

Professional Email Address Format

The most standard and recommended form of a professional email address is of course the firstname.lastname@domain.tld format. But there are some other ways you can get a professional email address, such as: firstnameinitial.lastname@domain.tld.

What is the safest way to send documents by email? ›

The safest way to send a document via email is by using encryption. This can be done by encrypting individual emails as well as email attachments. However, an easier way is to use electronic signature software, such as Signaturely.

What is the most secure way to send attachments? ›

To further protect email attachments, enterprises and users should use either Secure/Multipurpose Internet Mail Extensions (S/MIME) or Pretty Good Privacy (PGP).

Top Articles
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated: 11/26/2022

Views: 5834

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.