A BAK file is a backup copy that software creates automatically when you edit or save a document
When you open a file in certain programs — most commonly text editors, code editors, or older office software — and make changes, the program often saves a backup of the original version before overwriting it. That backup gets the .bak extension added to its filename. For example, if you edit a file called letter.txt, the program might create letter.txt.bak containing the version from before your edits.
The purpose is simple: if something goes wrong with your new version, or if you change your mind about the edits, you have the old version still sitting on your hard drive. You can open the BAK file and copy text from it, or rename it back to the original filename to restore it completely.
BAK files are not dangerous or malicious. They are just copies. Your antivirus software might flag them occasionally because they are less common than other file types, but that is a false alarm — the file itself is harmless.
Key Takeaways
- A BAK file is an automatic backup copy created by software before you save changes to a document.
- The BAK file sits in the same folder as your original file and has the same name plus the .bak extension.
- You can open a BAK file in any text editor to read its contents or restore text from it.
- Deleting BAK files is safe and will not affect your current documents, though you lose the backup if you do.
Which programs create BAK files
Text editors like Notepad++, Sublime Text, and gedit often create BAK files by default. Code editors including Visual Studio Code and older versions of Notepad also do this. Some older versions of Microsoft Word and other office software created them too, though modern versions usually do not.
Older programming tools and configuration file editors are common sources of BAK files. If you work with code or edit system files, you will likely see them accumulate. Some programs let you turn off BAK file creation in their settings, usually under a "Backup" or "Save Options" menu.
How to open and use a BAK file
A BAK file is just text (or sometimes binary data) with a different extension. You can open it in any text editor — right-click the file, choose "Open With," and select Notepad, Notepad++, or whatever text editor you use. The contents will display exactly as they were before you made your edits.
If you want to restore the old version completely, you can rename the BAK file back to its original name. For example, rename letter.txt.bak back to letter.txt. This overwrites your current version with the backup. On Windows, right-click the file, choose "Rename," and remove the .bak part. On Mac or Linux, use the terminal command mv letter.txt.bak letter.txt.
You can also copy text from the BAK file and paste it into your current version if you only want to recover part of the old content.
Where BAK files are stored
BAK files appear in the same folder as the original file. If you edit a document on your Desktop, the BAK file lands on your Desktop too. If you edit a file in your Documents folder, the backup goes there as well.
Because they sit alongside your working files, they can clutter your folders if you edit the same documents repeatedly. Many people delete old BAK files periodically to keep their directories clean. This is completely safe — the BAK file is only useful if you need to recover the old version, and once you are satisfied with your edits, you probably do not need it anymore.
Should you delete BAK files
Deleting BAK files will not harm your computer or your current documents. The BAK file is separate from your working file, so removing it does not affect anything you are actively using. You can delete them one at a time, or use your file manager to search for all *.bak files and remove them in bulk.
The only reason to keep a BAK file is if you think you might need to recover the old version of a document. Once you are confident your edits are final and correct, the backup serves no purpose. Some people delete them immediately; others keep them for a week or two as a safety net, then clean them up.
If you find BAK files accumulating and do not want them created in the first place, check your program's settings. Most editors have an option to disable automatic backups, though keeping them on is usually the safer choice.
BAK files and antivirus software
Occasionally, antivirus programs flag BAK files as suspicious because they are uncommon file types and the software does not recognize them. This is almost always a false alarm. BAK files are created by legitimate software on your own computer, not downloaded from the internet or installed by malware.
If your antivirus warns you about a BAK file, you can safely ignore it or add the file to your antivirus exclusion list. The file itself is not a threat — it is just a backup copy sitting on your hard drive.
Frequently Asked Questions
Can I recover a file if I deleted the original and only have the BAK file left?
Yes. Rename the BAK file to remove the .bak extension and give it back its original filename. For example, change document.txt.bak to document.txt. The file will then open normally in your programs.
Why does my editor create multiple BAK files for the same document?
Some editors create a new BAK file each time you save, overwriting the previous one. Others keep numbered backups like file.bak1, file.bak2, and so on. Check your program's settings to see how many backups it keeps and whether you can adjust that number.
Do BAK files take up a lot of disk space?
Individual BAK files are usually small — they are the same size as the original document. If you edit many large files repeatedly, they can add up, but for most people they are negligible. Deleting old ones periodically keeps your storage clean.
Is it safe to move a BAK file to a different folder?
Yes, you can move or copy BAK files anywhere. They are independent backups and do not need to stay in the original folder. Many people move them to a backup folder or external drive if they want to keep them long-term.