Q.Create a text file using notepad and write your name and save it. Now, create a .docx file using Microsoft Word and write your name and save it as well. Check and compare the file size of both the files. You will find that the size of .txt file is in bytes whereas that of .docx is in KBs.
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →A .txt file stores only plain text characters, making it very small. A .docx file, however, is a complex archive containing XML files for content, formatting, metadata, and potentially embedded objects, leading to a significantly larger size even for minimal text.
When you create a text file (.txt) and a Word document (.docx) with the same simple content, like your name, you'll observe a significant difference in their file sizes. The .txt file will be much smaller, often just a few bytes, while the .docx file will be several kilobytes. This difference stems from the fundamental way each file type stores information.
Understanding .txt Files
A .txt file is a plain text file. This means it stores only the raw characters you type, without any formatting information (like bold, italics, font size, color), images, or other complex data. Each character (like a letter, number, or symbol) is typically represented by a specific numerical code, such as ASCII or UTF-8.
For example, if your name is "Rohan", it consists of 5 characters. In a common encoding like UTF-8, each of these characters might take 1 byte of storage. So, the file size would be approximately 5 bytes. There might be a few extra bytes for a line ending character, but the total size remains very small, directly proportional to the number of characters.
Understanding .docx Files
A .docx file, on the other hand, is a much more complex file format. It's not just a simple text file; it's an Open XML document, which means it's essentially a compressed archive (like a .zip file) containing multiple other files and folders.
Here's what contributes to the larger size of a .docx file:
- XML Structure: The core content, formatting, and other document properties are stored in various XML (Extensible Markup Language) files within the
.docxarchive. For instance,document.xmlholds the actual text,styles.xmldefines the formatting styles,settings.xmlstores document settings, and so on. Even for a simple document, this XML structure itself adds a considerable amount of data. - Metadata: A
.docxfile stores a lot of metadata about the document, such as the author, creation date, modification history, template information, and more. This information is crucial for document management but adds to the file size. - Default Formatting and Styles: Even if you don't explicitly apply any formatting, a new Word document comes with default styles (like "Normal" style for paragraphs, default font, size, and line spacing). These default definitions are part of the file's structure.
- Embedded Objects and Features: Word documents are designed to support a wide range of features, including images, tables, charts, headers/footers, footnotes, comments, change tracking, and macros. Even if these are not used, the underlying structure to support them is present, contributing to the base file size. …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.