Password Protect a Document in LibreOffice
In this article
Yes, you can password-protect a document in LibreOffice in a few clicks. When you save a file with a password, LibreOffice encrypts it so that anyone opening it must enter the password. This works for Writer, Calc, Impress, and Draw documents. You'll need the document open and a password you want to use.
What You'll Need
- LibreOffice installed (free from the official site).
- The document you want to protect, open in LibreOffice.
- A strong password (mix of letters, numbers, and symbols).
Step-by-Step
- Open the document in LibreOffice (Writer, Calc, Impress, or Draw).
- Go to File > Save As (or press Ctrl+Shift+S).
- In the Save As dialog, choose the location and file name. Make sure the file type is the native LibreOffice format (e.g., .odt, .ods, .odp) or another format that supports encryption, like .docx or .xlsx.
- Check the box that says “Save with password” (or “Encrypt with password” in some versions).
- Click Save.
- A password dialog appears. Type your password in the “Enter password” field.
- Type the same password again in the “Confirm password” field.
- Click OK.
- If you're saving over an existing file, LibreOffice may ask if you want to replace it. Click Yes.
- Close the document and reopen it to test: it should prompt for the password.
Common Mistakes
- Forgetting to check the “Save with password” box before clicking Save.
- Typing different passwords in the two fields (LibreOffice will warn you).
- Saving in a format that doesn't support encryption, like plain text (.txt) or old Microsoft formats (.doc, .xls). These may not offer the password option.
- Losing the password – there is no way to recover it. If you forget it, the document is permanently inaccessible.
Tips
- Use a password manager to store your passwords.
- If you need to share the document, share the password separately (not in the same message).
- For extra security, you can also set a password to restrict editing (not just opening) in some formats, but the option is limited.
- Remember that password protection only encrypts the file at rest. Once you open it, anyone with access to your screen can read it.
Troubleshooting
If the password prompt doesn't appear after saving, or the document opens without asking for a password:
- Check that you actually checked the “Save with password” box. If not, repeat the steps and make sure it's ticked.
- Verify that the file format supports encryption. Save in an OpenDocument format (.odt, .ods, .odp) or a modern Microsoft format (.docx, .xlsx). Avoid .txt, .rtf, and legacy .doc/.xls.
- If you're using an older version of LibreOffice, the option might be under File > Save As and then a checkbox labeled “Encrypt with password”.
- If the document still opens without a password, open it again and re-save with the password option, making sure to replace the old file.
- If you get an error that the password is incorrect, double-check that Caps Lock is off and that you're typing the exact password you set.
Frequently Asked Questions
Can I password-protect a PDF exported from LibreOffice?
Yes. When you export to PDF (File > Export As > Export as PDF), go to the “Security” tab in the PDF options dialog and set a password for opening the PDF.
Does password protection work in all LibreOffice modules?
Yes, Writer, Calc, Impress, and Draw all support saving with a password. The option appears in the same Save As dialog.
Can I remove a password from a document later?
Yes. Open the document, go to File > Save As, uncheck “Save with password”, and save. The file will be saved without a password (but keep the old password-protected version if you want it).
What happens if I forget the password?
Unfortunately, there is no way to recover it. The file is encrypted, and without the password, the data is inaccessible. Always keep a backup or use a password manager.
Is the password protection strong?
LibreOffice uses strong encryption (AES-256 by default in recent versions). The security depends on the strength of your password. Use a long, random password for best protection.
Can I set different passwords for opening and editing?
In some formats, like .docx, LibreOffice allows you to set a “write-protection” password separately. When saving, you may see an option to set a “Password to modify” in addition to the open password. This is not available for all formats.