file extension
The file extension consists of a few characters after the last dot at the end of the filename, indicating the file type and what can open it.
In plain terms
A file extension is the end of a file's name: ".pdf" in "szamla.pdf", ".jpg" in "nyaralas.jpg". It is like the label on a jar: you do not need to open it to know whether it holds jam or pickles.
Your computer also looks at this label. It uses it to decide whether to open the image viewer, word processor or spreadsheet application when you click the file, and which icon to show next to it.
But a label is only a caption, not the content itself. If you write 'cucumber' on a jam jar, it still holds jam. Likewise, a file does not change just because you rename its extension.
It matters for AI tools too. A chatbot or coding agent knows partly from the extension whether an uploaded file is a spreadsheet, an image or source code, and in what format to save the finished work.
How it works
- When a program saves a file, it appends a symbol of its own format to the name, for example, Word adds '.docx' and an image editor adds '.jpg'.
- The operating system (Windows, macOS, Linux) keeps a record of which program belongs to which file extension. This is called an association, and you can change it. macOS and Linux often also examine the file content in addition to the extension.
- On a double click, the system checks the extension, finds the associated program, and opens the file with it.
- The opening program then reads the file's actual internal structure. If this does not match the extension, you receive an error message or unreadable characters.
- Development tools and coding agents likewise infer what is in a file from its extension: '.py' is Python code, '.json' is structured data, and '.md' is text formatted with Markdown markup.
An everyday example
A compressed (.zip) attachment received in an email contains a file named "szamla.pdf.exe". Windows by default hides known file extensions, so you only see "szamla.pdf", and the file may even have a PDF icon. In reality, however, it is an executable program that can damage your computer. If you enable the display of file extensions, the fraud is immediately revealed.
Who is affected
A common misconception
Limits and risks
- The extension is not proof: anyone can rewrite it for anything, so it does not guarantee by itself that the file is what it appears to be.
- Windows hides known file extensions by default, so deceptive double extensions (such as ".pdf.exe") can easily slip past your attention.
- The same extension can denote multiple incompatible formats and does not reveal the format version either.
- Even a seemingly harmless extension does not guarantee security: documents can contain hidden macros or misleading instructions intended for AI tools.
Similar, but not the same
- File format – The file format is the actual internal arrangement of data; the extension is merely a name-based indicator pointing to it.
- MIME type – The MIME type (e.g., 'image/png') indicates the content type on the internet between browsers and email clients and is not part of the filename.
- browser extension – In English this is also 'extension', but it refers to a plug-in program installable in the browser; it has nothing to do with file names.
Related concepts
file, filename, file system
File format, MIME type, metaadat, operating system, attachment
A brief history
The extension originates from computer systems of the 1960s–70s, such as the operating systems of DEC machines and the 1974 CP/M. The MS-DOS released in 1981 adopted this pattern and popularized the format consisting of a name of up to eight characters and an extension of up to three characters. On home Windows machines, Windows 95 (1995) made long filenames common. Since then, the length of the extension has not been fixed, allowing longer variants to spread, such as .jpeg or .docx, introduced in 2007.
Where things stand
As of late 2026, every widely used operating system uses it, although phones and cloud storage often hide it from the user. With the spread of AI tools it has become important again, because chatbots and agents partly rely on it to recognize what they have received and what they need to produce.
In the news
- DeepSeek's agent platform reaches 1.54 million daily users as Chinese open models spreadNov 2, 2026 · Agent Age
- Universities set AI policies: Colorado, Nebraska, UIC and Harvard ExtensionNov 2, 2026 · Education & Family
- Malicious Claude Code extension in Cursor marketplace reportedly reaches 5,000 usersNov 2, 2026 · Code
- Tampered Claude Code extension installed an SSH backdoor on about 5,000 machinesOct 30, 2026 · Agent Age
- Trojanized Claude Code extension on Cursor marketplace delivered SSH backdoor to developer machinesOct 29, 2026 · Code
- CodeAudit AI VS Code extension monitors all developer activityOct 12, 2026 · Code
- OpenAI and four rivals publish Agent Plugins, a common extension formatAug 10, 2026 · Code
Also known as
file extension · extension · file extension · file extension · filename extension · file extension · filename extension · file suffix
Sources
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.