There are text files and there are image, video, and music files. Why are image, video, and music files considered binary files, and why are text files not?

  • 7
    We just call them binary to distinguish them from human-readable files. The ascii/utf data in a text file is still stored in binary by the computer, but it's a lot easier for a human to interpret with a simple text editor than an mp3 or a jpg. – Andrew Apr 11 '16 at 17:38
  • 1
    @AndrewPiliser thank you for that quick response. do you know about any resource where I can learn about this topic everything about binaries I don't have a Computer Science degree and I'm interested to learn thank you – Luis Javier Apr 11 '16 at 17:45
  • 1
    The various ways of encoding information on disc are called File Formats. You an bing/google, for example, for MP3 File Format – Erik Eidt Apr 11 '16 at 17:49
  • If you google a few file formats you should be able to find explanations of how they are translated between bits on a drive and whatever they are supposed to mean. Some simple ones like ASCII or PBM might be best to start with. – Andrew Apr 11 '16 at 17:51
  • 1
    Possible duplicate of What are binaries? – svidgen Apr 11 '16 at 18:46

Obviously every file is binary when it comes down to it, since every file is stored as bytes and bits. But colloquially, binary file just means any file which is not a text file. And text file means a file which consists of characters (in some character encoding or character set) and which you can open and edit in an ordinary text editor.


It's a matter of levels of indirection and degree of convention, as so many things in CS are. All files are stored as binary, but some (text files) are stored with a sufficiently simple binary format (a text encoding) that any of a very wide range of programs can display at least a basically correct and useful rendering of the contents that can be edited by straightforward keyboard usage. This includes not only actual unstructured plain text, but also more heavily structured formats such as Markdown, XML, JSON, and so on … as well as source code in nearly any programming language.

Contrast this with sophisticated formats like MPEG-4 or XLSB, which require a much more substantial decoder to make any sense out of the file, and can only be edited (in the general case) with a complex and specialized UI.


Text files are also binary files. They are just binary files with file formats which follow certain conventions, like certain bit-sequences representing certain characters. But even those conventions aren't uniform, because there are many different character encodings, and different standards for line endings.


Everything in computers are stored as 0 or 1 i.e. so called binary values. You can open any file and read it in binary format irrespective of the file extension.

But the special logic is needed to read the file if those 0's and 1's means different to for that file. e.g. 1000001 can refer to its binary equivalent or decimal equivalent of 65 or if you want to read as ASCII then it would mean A.

All the logic is how you want to read it. Similarly the JPEG files are also binary but you read its values differently using different encoders.

As Shakespeare said "Beauty lies in the eyes of beholder."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.