How to password-protect and encrypt documents in LibreOffice Writer

Last update: 14/01/2026
Author Isaac
  • LibreOffice allows you to encrypt documents with a password when saving them, blocking them from being opened and/or modified.
  • Writer offers additional protections for sections, tables, indexes, and objects to prevent accidental changes.
  • Real security depends on using strong passwords and keeping the system and software up to date.
  • Supplementing LibreOffice with external encryption and best practices minimizes the risk to sensitive files.

LibreOffice vs WPS Office vs OnlyOffice for Windows

If you work with sensitive documents on your computer, password-protecting them in LibreOffice isn't just a whim: it's a very practical way to ensure that even if someone gets hold of the file, they can't read a single line without your permission. From medical reports to your tax return or a list of passwords, encrypt documents with a strong key It can save you a big scare if your PC, mobile phone, or memory USB They fall into the wrong hands.

It's also very useful when you want to share sensitive data with another person, for example, send your ID or card details Ask a family member to handle something for you. Instead of sending the information in plain text via email or messaging, you can encrypt the document, attach it, and share the password through a different channel. Even if someone intercepts the file, they will only see meaningless characters thanks to the strong encryption used by LibreOffice.

Why it's worth protecting documents with a password

Most users don't consider it until they have a problem. His office documents contain highly sensitive informationIn a simple LibreOffice Writer text file, you can store medical data, employment contracts, budgets, copies of official documents, or anything else you wouldn't want circulating.

When those files are stored in the cloud, on a USB drive, or in a computer folder without any protection, All it takes is for someone to have access to the device. to open them without further obstacles. If, on the other hand, you keep them encrypted with a strong password, you're adding a very powerful layer of defense against theft, loss of devices, or unauthorized access.

LibreOffice formats in their current version use Robust encryption based on modern standardsThis means that, if you choose the right password, practically speaking, the content will be impossible to read without knowing it, even if someone downloads the file and tries to open it with external tools.

How to save a LibreOffice Writer document with a password

LibreOffice Writer includes everything you need as standard save a password-protected documentwithout installing anything additional. The process is very simple, but it's helpful to understand what options appear to avoid confusion.

If the file already exists and you only want to protect it from now on, you will have to use File> Save AsIf it's a new document that has never been saved before, clicking Save will open the same dialog box as Save As, so the process is identical.

In the save window, in addition to choosing the folder and file name, you'll see a box that says something like “Save with password”That box is the key to the whole process: check that option before clicking Save so that LibreOffice prompts you to define the password.

Once you confirm the save, the box appears “Set password”This dialog has two main parts and a button. “+ Options” to see all the protection options. Although it may seem technical, it really comes down to deciding if you want to protect:

  • The opening of the document (so that no one can open it without a password).
  • Only the modification (that anyone can read, but not edit without a password).
  • Both things with different passwords, if you need finer control.

Prevent the document from being opened without knowing the password

If your priority is that no one can even see the content, you need to focus on the section of “File encryption password” within the "Set Password" box. That's where you configure the login key.

In that section you must enter a password in the first field and re-enter it in the confirmation field right below. LibreOffice forces you to enter this double password to avoid typos, because if you save the document with a password that you actually typed incorrectly, there will be no way to access it later.

The program applies a very high level of encryption of the content The file's text, images, and embedded objects will be protected and cannot be read with external editors or tools that attempt to forcibly open the file. If you lose or forget this password, there is no magic "trick" to recover it; in practice, the document is considered unrecoverable.

That's why it's essential that the key you choose is both safe and memorableDon't use obvious information like your name, phone number, date of birth, or words easily associated with you. Also, don't reuse the same password you use for other accounts, as this opens a huge door to attacks based on previous data breaches.

  How to Add Lists in PowerPoint: Complete Guide with Tricks

Use the "Open file for read only" option

In the same "Set password" box you can check the box “Open file for read-only”This option does not replace the encryption password, but modifies the behavior when opening the document once the correct key has been entered.

When you activate this function, opening the encrypted file will display it in read-only modeYou will usually see a banner at the top indicating that the document is locked from changes, along with a button that allows you to switch to edit mode.

This setting is useful if you want avoid accidental changes This applies to your own protected documents, forcing you to take an extra step before making any changes. It also allows other people who have the password to read the document initially without accidentally editing it, although they will later have the option to enable editing.

Allow reading, but block modification of the document

There are scenarios where it's in your interest that anyone can Open and read the document freely.but that its content cannot be changed without authorization. That's what the section is for. “Password to share the file”also within the "Set Password" box.

In this section, you define a password different from the opening password (or even just the opening password, if you're not going to protect the opening password). You enter the modification password in the first field and repeat it below to confirm. Once this is done and the document is saved, LibreOffice considers it protected. protected against editing.

When you open the file, Writer will display the content, but in read-only mode, indicating in the interface that it cannot be edited. Although it allows you to see all the text, if you want to change anything you will have to switch to edit mode, and at that point the program will ask you for the modification passwordOnly someone who knows that key will be able to save changes to the original document.

It is important to understand one nuance: this modification protection It does not prevent someone from keeping a copy of the content. Anyone could open the document in read-only mode, use File > Save As to create a new, unprotected file, and edit that copy. Modifier protection is meant to safeguard the original document, not to prevent its content from being reused in another file.

Open a protected document for reading or modification

When you try to open a LibreOffice file saved with an opening password, the program will display a dialog box called something like “Enter the password”You will need to enter the correct key to access the content; if you enter the wrong key, LibreOffice will not be able to open it.

In the case of documents protected only for modification, when you open them you will still see a warning that you are in read-only modeYou can scroll through the text, copy sections, or print it, but you can't change anything without pressing the edit button. Doing so will bring up another dialog box asking for the edit password.

If you have set both an opening password and a modification password, remember that they are two different levels of protectionKnowing the modification key will not allow you to open the file if you do not also enter the encryption password in the first step.

Protect against opening only, against modification only, or both.

LibreOffice gives you a lot of flexibility, so you can combine the options in different ways depending on your needs. In fact, it's possible define two different passwordsOne to decrypt and open the file, and another specifically to allow changes to the already open document.

In practice, you may encounter these typical scenarios:

  • Total lock (opening + modification)You define the encryption password and, in addition, a modification password. Only someone who knows the first password can view the document, and only someone who has the second password can edit it. This is the most restrictive option.
  • Opening cipher onlyFill in the "File encryption password" field and leave the "Modification" field blank. Anyone with the key will be able to read and edit the document without further restrictions.
  • Only change lockYou don't activate encryption passwords, but you do define a key in "Password to share the file". This way, the document is readable by everyone, but only editable by someone who has that modification password.

When you want to completely remove the protection from a document that already had a password, simply open it (entering the password if necessary), go to File> Save As and uncheck the box “Save with password”After saving the new version, that file will no longer ask for a password.

Other ways to protect content in LibreOffice Writer

In addition to the encryption and password system when saving the file, LibreOffice offers several internal functions for avoid accidental or unwanted modifications in specific parts of the document: sections, tables, indexes, fields and the document itself in certain formats.

Protect sections of the document

In Writer you can divide the content into sections and, within each of them, activate write protectionWith or without a password. This is useful, for example, to prevent certain parts of a contract, template, or report from being edited.

  Dynamic Charts in Powerpoint: Charts That Update Automatically

If the section does not yet exist, Select the text you want to protect. and create a section from the corresponding menu in Writer. If you already have sections defined, you can go to the section editing dialog, choose the one you want from the list, or use the Navigator, right-click on the section, and access its properties.

In the options in that section you will find the section for “Write protection”If you only want to lock it without a password, check the "Protect" box and you're done. If you want unlocking to require a password, also check that option. “Password protected” and press the “Password” button to enter it twice.

To change the protection Later, you return to that same sections dialog. If the section was previously password-protected and you now want to add one, select "Password required" and set the password. If it already had a password and you want to remove it, uncheck that box and enter the current password to confirm. You can also change the password by clicking "Password" and typing a new one twice.

If what you want is completely disable section protectionSimply uncheck the "Protect" box. If it was password protected, you will need to enter the password to confirm the change.

Protecting cells and tables in Writer documents

Writer also allows protect the contents of individual cells or entire tablesThis is useful when designing forms or documents with tabular structures that you don't want to be distorted.

For one or more cells, you place the cursor inside or you select the range Then you use the corresponding option in the table menu to activate the protection. If you need to protect the entire table, you select it completely and access the same option from the menu.

When you want to reverse that protection, simply place the cursor in the protected cells and use the option to check out in the same menu. For an entire table, you can also use the Navigator: right-click on the table and choose “Table ▸ Unprotect”, or select all and use the table menu to remove the lock.

Block summaries and indexes from manual changes

The indexes and tables of contents automatically generated by Writer are already created with protection against direct modificationsto prevent them from being altered by hand and damaged.

If you need to adjust that protection, you can right-click on the index or summary in the document itself and open the index editing dialog box. On the tab "Kind" You will find the "Protected against manual changes" box, which you can check or uncheck as you see fit.

Another way is to use the Navigator: locate the index in the list, right-click, and activate or deactivate the option “Index ▸ Read only”This is how you decide whether that element allows manual changes or if it can only be updated using LibreOffice's automatic tools.

Protect fields, bookmarks, and the entire document

In the LibreOffice Writer settings you can enable general functions for protect all fields or all markers in the face of modifications, which helps prevent errors when editing documents with a lot of automation.

In addition, there is a specific option for protect the entire document from changes When saved in certain formats such as .doc, .docx, .odt, or .ott, you can enable the "Protect form" option in the LibreOffice Writer options menu, under compatibility, to treat the document as a locked form.

Protecting content, position, and size of objects in Writer

When you insert images, frames, diagrams, or OLE objects into a document, you sometimes want to... Do not move or resize accidentallyespecially in more elaborate designs or templates.

Each type of object has its own properties dialog where you can activate specific content, position, and size protections. Although the menu path changes slightly depending on the object, the idea is always the same: you select the item, open its properties, and check the boxes for protection you need.

For an image, for example, you select it and choose Format > Image > Properties From the main menu, or by entering "Properties" from the context menu. In the "Options" tab, you'll see the "Protect" section, where you can select content, position, and/or size to prevent changes.

If it's a text box or a shape, first select the object and then open Format > Text box and shape > Position and size (or use the equivalent option from the context menu). Within the “Position and size” tab, you will again find the protection section to lock movement or resizing.

In the case of OLE frames or objects, the procedure is very similar: you select the object, you choose Format > Frame and Object > Properties Or you open the context menu with “Object”, and in the “Options” tab you activate or deactivate the boxes to protect content, position and size.

  Tips to remove iCloud account from iPhone

Other related protection and encryption options

Although the focus here is on LibreOffice, it's worth knowing that there are others. external programs widely used to encrypt files of any kind before uploading them to the cloud or sharing them. They are not essential for using passwords in Writer, but they do complement the overall security of your documents. In corporate environments, there are also controls such as DLP in Microsoft 365 to protect sensitive data.

Tools like 7-Zip, AES Crypt, AxCrypt or VeraCrypt They allow you to encrypt individual files or even entire folders with robust algorithms (such as AES-256) and a strong password. You can also digitally sign documents in Windows To add integrity and authenticity to your files. This way, even if someone gains access to your cloud account or hard drive, they will only see an unreadable encrypted file without knowing the key.

It is also common to compress many documents into a single password-protected .rar file using WinRARThis simplifies management when you want to protect a large number of files at once, instead of one by one. Simply select the folder, choose the "add to archive" option in the WinRAR menu, and define a password for the entire package.

In the case of services such as Google DriveThe platform does not offer a native file encryption system with a password like LibreOffice. The solution involves First encrypt the document on your PC (either with the LibreOffice function or with one of these external programs) and then Upload the protected file to the cloud..

How to choose a strong password for your documents

All this security is useless if you then use a password like “1234” or “maria2020”. A reliable password must have certain minimum characteristics to be effective. difficult to guess or break by brute force.

It is recommended that your password has at least 8 characters, although it's better if you get closer to 12 or moreand that you mix uppercase and lowercase letters, numbers and SymbolsEach additional character makes the job of an attacker trying random combinations much more difficult.

It is also vital that it be a password unique and randomDon't reuse the same password you use for your email, social media, or other online services. Avoid dictionary words and obvious combinations; instead, use a long phrase with some creative variation, or rely on a... password manager that generates secure chains for you.

Although we are all tempted to use easy-to-remember passwords, they are usually the first to fall in an attackIf the document you are protecting contains truly confidential information (bank details, legal documents, medical records, etc.), it is worth making the effort and using a strong password.

Extra tips to keep your documents safe

Password-protecting your LibreOffice files is only part of the story. For truly effective protection, you also need to take care of the... general security status of your equipment and your usage habits.

First of all, it is important to have both the operating system and LibreOffice are always up to dateThe new versions fix vulnerabilities that attackers could exploit to access your computer or documents. WindowsFor example, you can check Windows Update from the Settings and apply patches regularly, and it is recommended clear recent document history in Office to reduce privacy leaks.

In addition, you should have a good antivirus that monitors the system and detects threats before they affect your data. Windows Defender It's a fairly competent option integrated into the system, but there are also third-party alternatives, both free and paid, such as Avast or Bitdefender.

Another key point is Only install programs from official sources.Downloading LibreOffice, encryption software, or any other software from dubious websites can end up getting you infected. malware on your PC, with the risk that they will encrypt your own files to demand a ransom or steal the information directly.

Finally, common sense remains your best ally: don't open strange attachments you receive in emails, don't click on suspicious links, and Don't install add-ons from unknown sources.Many attacks require the user to click somewhere to start working; if you don't, the malware has no chance.

With all this in mind, use LibreOffice's features to Add passwords and encryption to your most sensitive documents It will give you a very reasonable level of security against prying eyes, loss of devices and unauthorized access, provided that you accompany that technical protection with good practices and strong passwords.

How to protect documents with sensitivity labels
Related article:
How to protect documents with confidentiality labels