FTP 101 - part 2: FTP transfer types – ASCII vs. Binary
Published {$created} by Carsten Blum
The FTP protocol supports two basic transfer modes, which is very unlike anything else you might know. Has Dropbox ever prompted you before loading a file Hey - are we going ascii or binary here buddy?, no, because only the FTP support such idiosyncrasies. In this post in the FTP 101 tutorial series I'll look into the difference between the two.
What are FTP transfer modes?
So here it is with at bit of humor - seriously why can’t FTP just behave like Dropbox and transfer everything the same way?
Well… imagine it’s the late 1970s. Computers are the size of refrigerators, internet speeds are measured in “screams per minute”, and operating systems don’t exactly get along. One system ends lines with LF (\n), these would be you Unix/Linux/macOS (Mac OS newer after OS X). Another with CRLF (\r\n), basically just Windows / DOS. And some just like to be difficult.
So, the designers of the FTP protocol had to make a choice:
“Should we send files exactly as they are (byte-for-byte), or should we try to be helpful and fix things like line endings when transferring text?”
Their answer?
“Let’s do both!”
Hence, two modes were born:
ASCII mode for text files – helpful but risky if used wrong.
Binary mode for everything else – safe, raw, and brutally honest.
Modern tools like Dropbox, Git, and cloud storage services figured out smart ways to auto-detect and handle file types. FTP? It leaves that decision to you. And if you pick the wrong one? Enjoy your corrupted .zip file!
ASCII mode – for text files
When using ASCII mode, the FTP client and server try to be helpful by automatically converting line endings during file transfer to match the target system’s convention.
For example:
A .txt file created on Windows uses CRLF (\r\n) to mark the end of each line.
If you upload that file to a Linux server in ASCII mode, the FTP server will automatically convert those CRLF line endings to LF (\n) – the native Unix style.
Likewise, when downloading a Unix-style file to Windows, ASCII mode would convert LF to CRLF. This behavior ensures that plain text files (like .txt, .csv, .html) display correctly in native editors on the destination system.
However – and this is important – ASCII mode is only safe for plain text files. If you use it to transfer binary files (e.g. .zip, .exe, .jpg), the automatic line-ending conversions will corrupt the file, often silently. That’s why Binary mode should always be used for non-text content.
Binary mode – for everything else
Contrary to ASCII, binary mode tells the FTP client and server to transfer the file exactly as-is, byte for byte, with no conversions whatsoever.
This means:
No line-ending changes
No encoding tweaks
No “helpful” transformations
Whether it’s a .zip, .png, .pdf, .mp3, or even a .txt file – the entire file is sent unchanged from source to destination. Binary mode ensures that every bit and byte arrives exactly as it was on the original system, regardless of operating system differences. This is essential for non-text files, because any change (like modifying line endings) would corrupt the file and make it unusable.
Even for text files, many developers prefer binary mode today to avoid accidental alterations – especially when working with mixed environments or automated scripts.
When to use ASCII vs. Binary?
Unless you know you’re working with plain text, always use Binary mode. It’s the safest, most reliable option for all file types.
ASCII mode can be helpful for text files – but if you pick it by mistake for anything else, you risk corrupting the file.
My recommendation - just use binary!
How to set the mode in popular FTP clients
Setting ASCII mode in FTP CLI. Start by connecting to the edge server, where edgeN is your assigned edge server, for instance edge7.ftpgrid.com:
ftp edgeN.ftpgrid.com
Simply type
ascii
Upload your textfile
You can switch back to binary mode any time with the command
binary
In FileZilla the process is
Open FileZilla
Go to Transfer -> Transfer type in the top menu
Select ASCII from the list
That’s it! FileZilla will now transfer files using ASCII mode until you change it again. Don’t forget to switch back to BINARY after transferring text files to avoid corrupting other file types.