.bak

What is a .bak file?

Backup File · Data · Various · n/a

A BAK file is a backup copy a program saves before it overwrites your work, so you can roll back if something goes wrong. Its real format is whatever it copied, and you open it by restoring it to that original extension.

Category
Data
Type
Binary
Is a .bak file safe to open? Safe: a .bak is a copy of your own file, so restoring it just gives you an earlier version. Scan it first only if it came from someone else, since the extension does not reveal the contents.

What is a .bak file used for?

Many programs, from text editors to databases and CAD tools, write a .bak automatically each time you save, keeping the previous version as a safety net. The .bak itself is just that earlier file with a renamed extension.

To use one, restore it: make a copy, rename the copy from .bak back to the original extension (for example drawing.bak to drawing.dwg), and open it in the program that made it.

Because a .bak mirrors the original, its contents can be text or binary depending on what was backed up. There is no single viewer; the right program is the one that created the backup.

If several .bak files exist, the newest is usually the most recent good version. Keep one until you are sure the current file is fine.

How to open a .bak file

The .bak format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • Rename to the original extension, then open in that program
  • text editor (to inspect)

macOS

  • Rename to the original extension, then open in that program
  • text editor (to inspect)

Linux

  • Rename to the original extension, then open in that program
  • text or hex editor

Web

  • Not applicable

How to convert a .bak file

You can convert a .bak file to Rename to the original extension using a conversion tool or the export menu of an app that opens it.

.bak file signature (magic bytes)

Programs recognise a .bak file by the bytes at the start of the file, not by its name. These are the signatures for BAK.

Hex signatureOffsetNote
(no fixed signature)0no fixed signature; a .bak is a copy, so its real bytes are whatever it backed up

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .bak file?

A BAK file is a backup copy a program saves before it overwrites your work, so you can roll back if something goes wrong. Its real format is whatever it copied, and you open it by restoring it to that original extension.

How do I restore a BAK file?

Copy the .bak, rename the copy from .bak back to the original extension the program uses (for example .dwg, .sql or .docx), then open it in that program. Keep the original .bak until you have confirmed the restored file is good.

Is it safe to delete BAK files?

Usually, once you are sure the current version of the file is correct. A .bak is only a fallback copy. Keep the newest one until you no longer need to roll back.

Related formats

Sources

Details on this page were checked against authoritative references: