A .bak file is a backup copy of a document or program file that your computer or software creates automatically

The ".bak" extension stands for "backup". When you edit a file — a spreadsheet, a piece of code, a configuration file — some programs save a copy of the original version before you make changes. That copy gets the .bak extension added to its name. So if you edit a file called "budget.xlsx", the program might create "budget.xlsx.bak" at the same time.

These files sit quietly in the same folder as the original. You usually don't see them unless you tell your computer to show hidden files, or unless you're looking for them on purpose. They're there in case you need to go back to what the file looked like before you started editing.

Key Takeaways

  • .bak files are automatic backup copies created by text editors, spreadsheet programs, and other software before you save changes to a file.
  • They have the same name as the original file with .bak added to the end, and they sit in the same folder.
  • You can delete .bak files safely if you're confident you don't need the old version — they're not required for your computer to run.
  • Some programs create them by default; others let you turn the feature on or off in settings.
  • If you accidentally saved over a file with wrong information, the .bak version may let you recover the previous version.

When and why programs create .bak files

Different software handles this differently. Text editors like Notepad++ create a .bak file every time you save a change. Some spreadsheet programs do the same. Others only create one if you turn on the feature in preferences. A few don't create them at all.

The reason is straightforward: accidents happen. You might realize five minutes after saving that you deleted something important, or that you overwrote data you meant to keep. A .bak file gives you a way back to the version from before your last save — not a full undo history, just one snapshot of the file as it was.

Programmers and people who work with code files see .bak files most often, because code editors almost always create them. But anyone who edits text files, configuration files, or other documents might find them in their folders.

How to find and use a .bak file

On Windows, .bak files are usually hidden by default. To see them, open File Explorer, click the View tab at the top, and check the box that says "Hidden items". Now you'll see any .bak files in that folder.

On Mac, open Finder, press Command + Shift + Period (the period key), and hidden files will appear. Look for any file with .bak at the end of the name.

Once you find the .bak file, you can open it with any text editor or program that opens the original file type. If the current version of your file is corrupted or has the wrong data, you can copy the .bak file, rename it to remove the .bak extension, and use that version instead. For example, rename "budget.xlsx.bak" to "budget.xlsx" and you have your old version back.

The difference between .bak files and other backup methods

.bak files are not the same as cloud backups, external hard drive backups, or version history. They're a single snapshot — usually just the version from your last save, or sometimes the version from before you opened the file. They don't give you a timeline of changes the way Google Docs version history does, and they don't protect you if your hard drive fails the way an external backup does.

Think of a .bak file as a safety net for small mistakes — you saved the wrong thing, you overwrote data by accident, you want to see what the file looked like before your last edit. For larger protection — recovering from a hard drive crash, keeping years of file history, or syncing across devices — you need a real backup system.

Whether you should delete .bak files

.bak files are safe to delete. They're not system files, they don't run anything, and your computer doesn't need them to work. If you're running low on storage space, deleting old .bak files will free up a small amount of room. If you're cleaning up a folder and you're confident you don't need the old version of a file, the .bak file can go.

The only reason to keep them is if you think you might need to recover an old version of a file in the next few days or weeks. Once you've confirmed that the current version is correct and complete, the .bak file has done its job.

How to turn .bak file creation on or off

In most text editors, you control this in the preferences or settings menu. In Notepad++, go to Settings > Preferences > Backup, and you'll see options to enable backups and choose where they're stored. In other editors, look for a "Backup" or "Auto-save" section in preferences.

Some programs don't give you a choice — they create .bak files by default and don't offer a way to turn it off. Others don't create them at all. If you work with files where you want to preserve the old version before each save, turning on .bak file creation (if your software supports it) is a quick safety measure that costs almost nothing in storage space.

Frequently Asked Questions

Is a .bak file a virus or malware?

No. A .bak file is just a copy of a document or program file that your software created. It's not executable code and it can't run on its own. If a .bak file appeared on your computer, it was created by legitimate software you were using, not by malware.

Can I recover a file if I deleted it and the .bak file is gone too?

.bak files only help if they still exist. Once you delete both the original file and the .bak copy, a .bak file can't help you recover it. For deleted file recovery, you'd need to use data recovery software or restore from a backup on an external drive or cloud service.

Why does my .bak file have a different size than the original?

Sometimes the .bak file is smaller because it's a compressed version, or because the original file has grown since the backup was created. If the .bak file is much larger, it might be storing extra metadata. The size difference usually doesn't matter — what matters is whether the content inside is what you need.

Do I need to back up my .bak files?

No. If you're already backing up your main files to an external drive or cloud storage, the .bak files go along with them automatically. You don't need to treat them separately. If you're not backing up your files at all, backing up the .bak files won't protect you from a hard drive failure — you need to back up the actual files you care about.