Skip to main content

ASCII vs Binary Transfers

FTP, a legacy protocol, includes a built-in facility for converting line endings on text files between LF format and CRLF format. CRLF is most common on Windows applications. LF is most common on UNIX, Linux, and macOS applications.

Line-ending conversion is usually controlled by a "transfer mode" or "transfer type" setting in the FTP client. Most FTP clients let you choose between ASCII mode and Binary mode transfers. Use Binary mode by default. ASCII mode changes the contents of the file and corrupts anything that isn't plain text.

Avoid ASCII Mode

When ASCII mode is enabled, files with lines ending in CRLF format are converted to LF format on upload to Files.com, and LF format is converted to CRLF format on download from Files.com.

Only use ASCII mode for plain text files whose end-of-line (EOL) characters need to be converted for the receiving system. ASCII mode behavior is almost always undesirable because it changes the contents of the file, which corrupts files that are not plain text. We recommend against ASCII mode unless you require EOL conversion.

The "Binary mode" setting in your FTP client tells the FTP client never to alter the file. This is nearly always the appropriate choice. In Binary mode, the transmitted file is always received unmodified. Use Binary mode for all file types to avoid inadvertent changes to file contents.

FTP Mode Behavior Setting

Files.com offers a setting called FTP mode behavior that neutralizes the ASCII setting and tells our server to ignore it even when provided. This setting lets you switch between standard behavior and emulating the behavior of the built-in FTP server software included with most Microsoft Windows Server releases.

We do not recommend setting FTP mode behavior to emulate a Microsoft Windows Server for most customers. It introduces non-standard behavior that affects every FTP connection to your site.

Only change FTP mode behavior to emulate Windows when files are being corrupted by an FTP client that cannot update its own settings to select the proper transfer mode. When it is possible to update the FTP client's settings instead, that is the preferred approach.