A .bak file is a backup copy that a program creates automatically when you edit or save a document
When you open a file in certain programs — word processors, text editors, spreadsheet applications — and make changes to it, the program often creates a second file with the same name but ending in .bak instead of the original extension. For example, if you edit a file called budget.xlsx, the program might create budget.bak at the same time. That .bak file holds a copy of what the document looked like before you started editing.
The purpose is simple: if something goes wrong — your computer crashes, you accidentally delete important text, or you save over something you didn't mean to change — you have a recent copy to fall back on. It is a safety net built into the program itself, not something you have to set up manually.
Different programs handle .bak files differently. Some create them every time you save. Others create one only the first time you save a document. Some let you control whether they appear at all through the program's settings. The file usually sits in the same folder as the document you are editing, though a few programs store them elsewhere.
Key Takeaways
- A .bak file is an automatic backup copy created by your program, containing the version of a document before your most recent changes.
- Most text editors, word processors, and spreadsheet programs create .bak files, but the behavior varies by program and can often be turned off in settings.
- You can delete .bak files safely if you are confident you do not need the older version, as they are just backups and not required for the document to work.
- If you need to recover an older version of a document, look for the .bak file in the same folder as the original file and rename it to restore it.
Which programs create .bak files
Text editors like Notepad++, Sublime Text, and gedit often create .bak files by default. Microsoft Word and LibreOffice Writer can create them, though Word's behavior depends on your version and settings — older versions were more likely to create them automatically. Spreadsheet programs like LibreOffice Calc usually create .bak files when you save, while Excel's behavior varies.
Programming editors and code-focused tools almost always create .bak files because developers frequently need to revert to a working version if they introduce a bug. If you work with configuration files, log files, or scripts, you will see .bak files regularly.
Some programs do not create .bak files at all. Google Docs, for instance, saves versions to the cloud instead. Adobe programs like Photoshop and Illustrator use their own recovery systems rather than .bak files. The only way to know for certain is to check your program's preferences or documentation.
How to find and use a .bak file
Look in the same folder where your original document is stored. If you are using Windows, open File Explorer and navigate to the folder. If you are using Mac, open Finder. By default, .bak files are often hidden from view, so you may need to show hidden files first.
On Windows, open File Explorer, go to the View tab at the top, and check the box that says "Hidden items". On Mac, open Finder, press Command+Shift+Period (the period key), and hidden files will appear. Once you can see them, look for a file with the same name as your document but ending in .bak.
If you need to use the backup, you have two options. You can open it directly in your program — most programs can open .bak files the same way they open regular files. Or you can rename it to remove the .bak extension, which turns it back into a regular file your program recognizes. For example, rename budget.bak to budget.xlsx to restore it as a spreadsheet.
When .bak files take up space
A .bak file is usually the same size as your original document, so one or two backups do not matter much. But if you work with large files — video projects, high-resolution images, databases — .bak files can add up. Each time you save, a new backup might be created, and over weeks or months these can consume noticeable disk space.
You can delete .bak files safely. They are not required for your programs to run, and they are not part of your actual work — they are just old copies. If you are certain you do not need to recover an older version of a document, removing .bak files frees up space with no downside.
To delete them, navigate to the folder where they are stored, select the .bak files you want to remove, and press Delete or drag them to the trash. You can also configure most programs to stop creating .bak files altogether through their preferences or settings menu, though this means you lose the safety net if something goes wrong.
The difference between .bak files and other backup methods
.bak files are local and automatic, but they have limits. They only keep one or two old versions, they only exist on your computer, and they disappear if you delete them or if your hard drive fails. They are not a substitute for a real backup strategy.
A more complete backup system might include cloud storage like OneDrive, Google Drive, or Dropbox, which keeps multiple versions over time and protects against hardware failure. Version control systems like Git, used mainly by programmers, track every change you make and let you revert to any point in history. External hard drives or network backups provide offline copies of your entire computer.
For everyday work, .bak files are a helpful first line of defense — they save you when you accidentally overwrite something or your program crashes. But for documents that matter, they should be part of a larger backup plan, not the only one.
How to turn .bak files off if you do not want them
Most programs that create .bak files let you disable them through settings or preferences. In LibreOffice Writer, go to Tools > Options > Load/Save > General and uncheck "Always create backup copy". In Notepad++, go to Settings > Preferences > Backup and turn off the backup option. In other programs, look for a Preferences, Settings, or Options menu and search for "backup".
Turning them off saves disk space and reduces clutter, but it means you lose the safety net if you accidentally save over a file or your program crashes mid-edit. Most people benefit from leaving them on, especially if disk space is not a concern.
Frequently Asked Questions
Can I recover a file if I deleted it and the .bak file is gone too?
.bak files are just copies, so if both are deleted, you have lost that backup. However, your operating system may have other recovery options — Windows has File History and Mac has Time Machine, both of which can restore older versions of files if they are turned on. Check your system settings to see if either is active.
Is it safe to delete all .bak files on my computer?
Yes, .bak files are safe to delete. They are backups, not essential system files. Deleting them frees up space and does not affect your programs or documents. Just make sure you do not need to recover an older version of a file before you delete its .bak copy.
Why does my program create multiple .bak files instead of just one?
Some programs create a new .bak file each time you save, overwriting the previous one. Others keep multiple numbered backups like document.bak1, document.bak2, and so on. Check your program's settings to see if you can control how many backups it keeps.
What if I see a .bak file but I do not remember creating it?
Your program created it automatically. .bak files are generated by the software itself, not by you. If you do not recognize the document name, it may be a temporary file or a document you opened and edited without realizing it.
Can .bak files contain viruses or malware?
A .bak file is just a copy of another file, so it carries the same risk as the original. If the document itself is safe, the .bak copy is safe. If you are unsure about a file's origin, scan it with antivirus software before opening it, whether it is a .bak file or any other type.