Show file extensions in Windows before renaming a file
Enable file-name extensions, recognise names such as report.pdf.exe and avoid mistaking a renamed extension for a real format conversion.
In brief
In Windows 11 File Explorer, open View > Show > File name extensions. The visible suffix helps distinguish a PDF from an executable and makes renaming a file less ambiguous.
A familiar icon or a name containing .pdf is not enough to establish the file type. The final extension matters; report.pdf.exe is not a PDF just because the first part of its name says so.
This guide uses the linked product documentation. Worked scenarios explain how to check your own result; they are not measurements of your device.
Make the complete name visible
Open the folder containing the file, enable file-name extensions and look again at the name. In older Windows layouts, the option can appear on the View ribbon or in Folder Options; the goal is the same: do not hide the suffix when inspecting files.
For example, photo.jpg and photo.jpg.exe can look more similar when extensions are hidden. Inspect the complete name before opening an unexpected attachment.
Rename without accidentally changing the type
If you only want a more meaningful name, change the base name and keep the extension. Windows may warn if you change the suffix; read the warning rather than automatically accepting it.
If a renamed file stops opening, check whether you changed the extension by mistake. Restoring a known original name can fix that mistake, but do not guess a suffix for an unknown file.
Convert with a tool, not a new suffix
To turn an image into another format, use a converter that reads and writes image data. Keep the original, then compare the converted image and file size. A document renamed from .docx to .pdf is likewise not a PDF export.
For a download, combine the name check with the official source and, where supplied, a hash or publisher signature. A safe-looking extension alone cannot verify the file.
Try a harmless rename before touching an attachment
Create a plain text file containing “practice” and name it practice.txt. With extensions visible, change only the first part to notes.txt. It remains a text file. Changing the name to notes.pdf does not create a PDF; restore .txt if this was your own practice file.
An unexpected invoice.pdf.exe is a different case: .exe is the final extension and indicates an executable name. Do not open it or “fix” it by removing .exe. Verify the attachment with the sender through a channel you already trust. A PDF-looking icon or a familiar name does not establish its actual safety.
For a known image that genuinely needs a new format, use the image converter and keep the original. For a document that needs PDF, use its application’s export/print feature. Renaming is useful for labels, not format conversion.
Documentation for these steps: Microsoft Support — common file name extensions ↗
Tools for this task
Before you act
An extension is a clue, not proof of safe content. Changing .jpg to .png renames the file; it does not re-encode the image.
What to do next
- Open File Explorer and enable View > Show > File name extensions in Windows 11.
- Read the last extension in the full file name.
- When renaming, preserve the extension unless you deliberately know why it must change.
- Use an actual converter when you need another file format, and open the resulting file to check it.