A document is any file that holds information you can read and edit
A document is a computer file designed to store words, numbers, images, or a mix of all three in a way that lets you open it, read it, and change it. The most common documents are letters, spreadsheets, forms, and PDFs. Your device recognizes a document by its file extension — the letters after the dot at the end of the filename — which tells the device what program should open it.
Documents are different from other files because they are meant to be human-readable and editable. A photo file stores an image. A document file stores information in a format designed for you to work with it: to add text, rearrange paragraphs, fill in blanks, or print it out. When you save a document, you are saving the content and the formatting together in one file.
The word "document" originally meant a piece of paper with writing on it. In computing, it means the digital version of that same thing — information organized in a way that makes sense to read and use.
Key Takeaways
- A document is a file that stores readable information like text, numbers, or images that you can open and edit on your device.
- The file extension (the letters after the dot in the filename) tells your device which program should open the document.
- Common document types include Word files (.docx), PDFs (.pdf), spreadsheets (.xlsx), and text files (.txt).
- Documents are different from other files because they are designed to be read and changed by people, not just stored as data.
How your device knows what kind of document it is
Every document has a filename that ends with a period and a few letters. That ending is called the file extension, and it is the instruction tag your device uses to decide which program opens the file. If you have a file called "Letter.docx", the ".docx" part tells your device to open it with Microsoft Word or a compatible program. If the same file were named "Letter.pdf", the ".pdf" part tells your device to open it with a PDF reader instead.
Your device comes with default programs already assigned to common file types. When you double-click a document, your device looks at the extension, finds the program you have set as the default for that type, and opens the file there. If you do not have the right program installed, your device will tell you it cannot open the file or will offer to search for a program that can.
You can change which program opens a document type, and you can also change a document's extension — though changing the extension does not change what is actually inside the file. If you rename "Letter.docx" to "Letter.txt", your device will try to open it as plain text, but the Word formatting will still be there underneath, and the file will look garbled.
The most common document types and what they do
Different document types are built for different purposes. A Word document (.docx) is designed for writing letters, essays, and reports with formatting like bold text, different fonts, and margins. A spreadsheet (.xlsx) is designed for organizing numbers and data in rows and columns, and it can do math automatically. A PDF (.pdf) is designed to look the same on any device and is hard to edit, which is why forms and official documents often use it.
A text file (.txt) contains only plain words with no formatting at all — no bold, no colors, no special fonts. Text files open in any program and are useful for sharing straightforward information. A Google Doc or Google Sheet is a document that lives on the internet instead of on your device, so you can access it from any computer and share it with others to edit together.
Each type has a program that knows how to read and edit it. Microsoft Word reads .docx files. Microsoft Excel reads .xlsx files. Adobe Reader reads PDFs. Your device's built-in text editor reads .txt files. When you open a document, the program displays the content in a way that makes sense for that file type.
The difference between a document and other files
Not every file on your device is a document. A photo file (.jpg or .png) stores an image, and while you can view it, you do not edit it the way you edit a document — you use a photo editor instead. A video file (.mp4 or .mov) stores moving images and sound. A program file (.exe on Windows or .app on Mac) is an instruction set that makes your device do something, not information you read.
A document is specifically a file meant to hold information that a person reads and works with. You open it, you see the content, and you can change it. You save your changes back into the same file. This is different from a photo, which you view but do not edit in the same way, or a program, which you run but do not change.
Some files blur the line. A PDF can contain text you might want to edit, but most PDFs are locked against editing to keep them from being changed. A spreadsheet contains numbers and data, but it is still a document because you open it, read it, and edit it. The key difference is purpose: documents exist to be read and worked with by people.
How to tell what a document contains before you open it
The filename and extension tell you what program will open the file, but they do not always tell you what is inside. A file named "Resume.docx" is clearly a resume, but a file named "Document1.docx" could be anything. Before you open a document, you can look at a few clues to understand what it might be.
The filename itself is the first clue — most people name their documents something that describes the content. The file extension tells you what type of document it is and what program to use. On Windows, you can right-click the file and choose "Properties" to see when it was created or last changed, which can help you figure out if it is the version you are looking for. On a Mac, you can click the file once and press the spacebar to see a preview of the content without opening it fully.
If you receive a document from someone else and are not sure what it is, it is safe to open it in the program designed for that file type. The worst that usually happens is the file looks wrong or the program tells you it cannot read it. You can always close it without saving if you do not want to keep it.
Why documents need the right program to open
A document file is not just raw text sitting in a folder. It is a structured package that contains the content, the formatting instructions, and sometimes hidden information like who created it and when. The program designed for that file type knows how to read all those layers and display them correctly.
When you open a Word document in Word, the program reads the .docx file and shows you the text with the right fonts, colors, margins, and spacing. If you try to open the same file in a text editor, the program shows you all the hidden code underneath, which looks like gibberish. The content is still there, but the program does not know how to interpret the formatting instructions, so it displays them as text instead.
This is why you need the right program: not because the document is locked or broken, but because each program is built to understand a specific file format. Microsoft Word understands .docx. Adobe Reader understands .pdf. Google Sheets understands .xlsx. Using the right program means you see the document the way it was meant to look.
What happens when you save a document
When you save a document, your device writes all the content and formatting to a file and stores it in a folder. The program you are using decides what format to save in — Word saves as .docx by default, Google Docs can save as .docx or .pdf, and a text editor saves as .txt. You can usually choose a different format when you save, which is useful if you need to send the document to someone who uses a different program.
Saving creates a permanent copy on your device. If you close the program without saving, any changes you made since the last save are lost. Most programs warn you before you close if you have unsaved changes. Some programs, like Google Docs, save automatically as you type, so you do not have to remember to save manually.
When you save a document with a new name, you create a copy. The original file stays where it was, and the new file is a separate copy with the new name. This is useful if you want to keep an original version and make changes to a copy without losing the original.
Frequently Asked Questions
Can I open a document in a different program than the one it was made in?
Often yes, but not always perfectly. Many programs can read common formats like .docx and .pdf, but the formatting might look slightly different. For example, Google Docs can open a Word document, but some fonts or spacing might shift. If you need the document to look exactly right, open it in the program it was made for.
What does it mean when my device says it cannot open a document?
It means you do not have a program installed that can read that file type, or the file is corrupted. Try right-clicking the file and choosing "Open with" to see what programs are available. If none of them work, the file might be damaged or the extension might be wrong.
Is it safe to change a document's file extension?
Changing the extension changes how your device tries to open the file, but it does not change what is actually inside. If you rename a Word document to have a .txt extension, your device will try to open it as text and it will look wrong. You can change it back, and the document will be fine. Only change an extension if you are trying to convert a file to a different format.
Why do some documents look different on different devices?
Documents can look different because devices have different fonts installed, different screen sizes, and different versions of the programs that open them. A document that looks perfect on your computer might have shifted margins or missing fonts on someone else's device. PDFs look the same everywhere because they lock the formatting, which is why they are used for official documents.
Can I edit a PDF document?
Most PDFs are locked against editing to keep them from being changed. Some PDFs allow editing, and you can use a PDF editor program to change them. If you need to edit a document that came as a PDF, ask the person who created it for the original Word or Google Doc version instead.