When should I use ascii and when should I use binary?

ASCII vs Binary FTP Transfer Mode

 

When uploading files via FTP, you may need to choose between ASCII and Binary transfer modes.

 

When to Use Each Mode

  • Binary mode: Use for all non-text files including images (jpg, png, gif), compressed files (zip, tar.gz), PDFs, videos, audio, executables, and any file format that is not plain text. Binary mode transfers files byte-for-byte without any conversion.
  • ASCII mode: Use for plain text files including HTML, CSS, PHP, Perl scripts, JavaScript, and configuration files. ASCII mode converts line endings between operating systems (Windows uses CRLF, Linux uses LF).

 

Recommended: Use Auto Mode

Most modern FTP clients (including FileZilla) default to Auto mode, which automatically detects the file type and uses the correct transfer mode. We recommend leaving it on Auto. In FileZilla, this is set under Transfer > Transfer type > Auto.

 

Uploading a binary file in ASCII mode (or vice versa) can corrupt the file. If an image appears broken or a script does not work after uploading, re-upload it using the correct transfer mode.

  • 467 Users Found This Useful

Was this answer helpful?

Related Articles

How can I turn off directory indexing?

In the directory that you wish you turn off directory indexing, you can do it under Index Manager...

Whitelisting Our Support System Email Address

Whitelist Instructions Because we use often use html emails with http addresses in them, our...

How do I parse html files as shtml?

Parsing HTML Files as SHTML   To enable Server-Side Includes (SSI) processing in regular...

Adding HTML to Site Builder

Adding Custom HTML to the Weebly Site Builder   The Weebly website builder included with...

Your connection to this server has been blocked at the firewall

Blocked by the Server Firewall   If you see the message "Your connection to this server has...



Save 30% on web hosting - Use coupon code Hosting30