What is the BAK file format?
Files with the .bak extension are generated by various programs and used to store different types of backup copies. Backup copies are created, for example, when a document edited by a user is saved - the original version is preserved under the same base name with .bak added or substituted for the original extension.
Applications such as Microsoft SQL Server use .bak files to store backup copies of their databases. Backup copies are usually not deleted automatically; therefore, in case of data loss, the data can often be retrieved. Since various programs use .bak files to store different types of data, it is not possible to point to a single application that can open every .bak file. The internal structure depends entirely on the program that created the backup: an AutoCAD .bak is a valid DWG drawing that begins with an AC10xx header, while a SQL Server .bak contains an MTF stream. The most reliable approach is to identify what software created the file, rename it back to its original extension, and open it normally. Alternatives to the .bak convention include the .OLD and .ORIG extensions.
Frequently encountered .bak files
One of the applications using the .bak extension is the popular web browser Mozilla Firefox. The browser keeps automatic backup copies of its bookmark database in the bookmarkbackups folder inside the user profile. On Windows 10 and 11 this folder is typically located at C:\Users\<User>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\bookmarkbackups\. Older Firefox versions wrote a single file called bookmarks.bak; current releases write dated snapshots instead. Copying the relevant backup file back into the profile directory makes it possible to restore bookmarks after accidental deletion.
Security & safety
RISK: LOWA .bak is just a copy, so it's only as risky as the file it duplicates: a .bak of a clean document is harmless, a .bak of a malicious executable or macro-laden document carries the same risk as the original. Don't blindly delete .bak files until you've confirmed the working file is intact - they're often your only recovery copy. When recovering from one, scan it if its origin is uncertain, and never run a .bak you rename to .exe/.dll without verifying its source.
Format details
in a nutshellPrograms that open BAK files
file something.bak to detect the real type, then open with the right tool. Technical details
deep spec| MIME type | application/octet-stream - no dedicated MIME type exists; .bak is treated as arbitrary binary data |
| File signature (magic bytes) | None - .bak has no signature of its own. The opening bytes are those of the original file (e.g., AutoCAD .bak starts with AC10xx; SQL Server .bak starts with TAPE/MTF structures; a text editor's .bak is plain text) |
| Underlying structure | Inherits the structure of the original file - may be binary, plain text, XML, or compressed depending on which program created the backup |
| Naming convention | Same base name as the original with .bak appended or substituted for the original extension (e.g., drawing.dwg → drawing.bak, or document.docx.bak) |
| Purpose | Automatic fallback copy created before a file is overwritten or modified, allowing recovery of the previous state without user intervention |
| Retention behaviour | Typically kept on disk until manually deleted; most programs overwrite the existing .bak on the next save, retaining only the single most recent previous version |
| AutoCAD .bak specifics | A renamed copy of the last saved .dwg file; begins with the standard DWG AC10xx header and can be restored by renaming the extension back to .dwg |
| SQL Server .bak specifics | Uses Microsoft Tape Format (MTF); can contain full, differential, or transaction-log backups; restorable only via SQL Server or SSMS RESTORE DATABASE commands |
| Compression | Not inherently compressed; SQL Server backups support optional built-in compression; most other .bak files are verbatim uncompressed copies of the original |
| Identification method | Use the file command on Linux/macOS or a hex editor on any platform to inspect the header bytes and determine the underlying file type before renaming |
| Recovery method | Rename the file by removing .bak and restoring the original extension (e.g., rename report.bak to report.docx), then open with the appropriate program |
| Platform scope | Cross-platform convention used on Windows, macOS, Linux, and legacy DOS/OS2 environments - no single OS owns the practice |
| Firefox bookmark backups | The bookmarkbackups folder inside the Firefox profile holds dated .jsonlz4 snapshots; older Firefox versions used a single bookmarks.bak file for this purpose |
| Related fallback-copy extensions | .old, .orig, .tmp, and the ~ (tilde) suffix convention serve the same fallback-copy role across various platforms and editors |
| Released | Convention predates Windows; used since early PC software to keep a previous version |