How to password protect a document in LibreOffice

Learn how to password protect a document in LibreOffice with this step-by-step tutorial.

The steps on this page work for common document formats, such as Word (.doc, .docx), Excel (.xls, .xlsx), Open Document Format (ODF), and other documents.

LibreOffice is a free and open-source office suite for Microsoft Windows, Linux, and macOS.

LibreOffice includes the following applications; Writer (word processing), Calc (spreadsheets), Impress (presentations), Draw (vector graphics and flowcharts), Base (databases), and Math (formula editing). LibreOffice website

Before we begin, please understand that if you lose or forget the password, you will never be able to open the document, as LibreOffice uses strong encryption to encrypt documents. So, I recommend that you save the password using a password manager or memorize the password.


1. Open or create a new document in LibreOffice.

2. Click on File in the upper left corner.

3. Click on Save if it's a new document or click on Save as if it's an existing document.

Save a document in LibreOffice

A “Save As” window will appear.

4. Select a location on your computer where you want to save the document.

5. At File name, you enter a name for the document.

6. At Save as type, you select a document format.

7. Check the checkbox next to Save with password.

8. Click on the Save button.

Save a document with password in LibreOffice

A “Set Password” window will appear.

9. Type the desired password twice.

Enter a password for a document in LibreOffice

10. You can also mark the document as read-only, which means that you can only read it and need a password to edit it. You can do this by clicking on Options, checking the Open file read-only option, and then type your desired password twice.

Mark a document as read-only in LibreOffice

11. Click on the OK button.

LibreOffice will now save the document with password protection, also known as encryption.