How to remove ALL formatting in LibreOffice Writer?

Hi, I open my class assignments in LO Writer, and to answer questions I typically delete extranea and answer the questions on the document sent to me by my instructor. However even if I select all then Clear Direct Formatting, the number formatting, the paragraph formatting and the header formatting remain.

So if I want to type something at the top of the document it’s always going to be in the header format that the instructor chose, and when I go to answer the questions, my answers either get assigned numbers, because I hit enter at the end of the question before I start writing the answer, or the answers get indented because LO thinks I’m trying to enter another list item.

It just doesn’t seem possible to remove the formatting. Even cutting out the questions and pasting them into a document has the same issue, because the formatting follows the text. I’ve taken to manually retyping the whole document in a new doc, but this is terribly time consuming when all I want to do is answer the questions.

I’ve tried everything intuitive and searched for anwers online and hit the Clear Direct Formatting tab repeatedly, but so far nothing works and it drives me NUTS because this doesn’t seem like something that should be so hard to figure out. In MSWord there’s a clear formatting tab shaped like an eraser which removes ALL formatting, and I am hoping to find a similar function in LOWriter.

Any advice appreciated!

1 Like

You can achieve that in two ways. One way is to select all text, then click in the styles list on the toolbar and select Clear formatting. The other is to select all text, Copy, then Paste as unformatted text.

This is an answer to @DebianFanatic; it complements @mikekaganski’s.

To know how to clear formatting, you must first understand the layer model inside LO Writer. From deepest to shallowest:

  1. general styling settings in Tools>Options (used to preconfigure some “basic” paragraph styles)
  2. paragraph style
  3. character style
  4. very rarely, highly specialised flags causing overrides of character style (e.g.internet link flag)
  5. direct formatting

Conflicting attributes set by the layers are resolved in favour of shallower layer.

Direct formatting is defined as any formatting action applied outside styles: toolbar buttons, keyboard shortcuts, menu item actions, …

From this description, which tool to use to remove formatting becomes obvious:

  • Direct formatting is removed with Format>Clear direct formatting or Ctrl+M.

    There is a subtle exception. Making a list with toolbar buttons or [Shift+]F12 does not make a formatting note in the direct formatting layer but modifies the current paragraph style (paragraph layer), which explains why Ctrl+M does not remove numbering.

  • Character style is removed by applying Default Style character style: all formatting is reverted to the one defined by the paragraph style

  • There is no way to completely remove paragraph style because a paragraph must be tagged with a style. The closest thing to it is to apply a “neutral” paragraph style. Default Style is roughly intended for that. This style is supposed to set user-preferred defaults inherited by all other styles and should never be used directly to type text.

  • “Specialised” formatting can only be removed by ad hoc menu items (either from the menu bar or contextual menu)

IMHO, trying to remove all formatting is contradictory with the use of a document application. The question is nonsense. What OP really wants is added text formatted in a personal specific way. This calls for a specific paragraph style.

The problem comes from the Return typed to open a new paragraph because it causes the new paragraph to inherit the current style. Changing for a new style should be enough, provided the original document is built only with styles (no direct formatting even for lists).

If the goal is to obtain a plain ASCII text, File>Save As and choose Text format (.txt). Close Writer and use a text editor. You are then guaranteed to have no formatting markup in the way.

There’s no one button for this in LO.

However, it’s not difficult to do what you want. Any text has only few kind of formatting applied: Character formatting, Paragraph formatting, and List formatting. Each of them may be direct or using styles.

So, you need four actions when you pressed Enter and are in the newly created paragraph:

  1. Clear direct formatting (Ctrl+M).
  2. Apply Default paragraph style from Styles and Formatting sidebar (Paragraph Styles pane)
  3. Apply Default character style from Styles and Formatting sidebar (Character Styles pane)
  4. Turn off numbering (using e.g. F12 or Shift+F12, or toggle buttons on Formatting toolbar).

That’s it.

Of course, you may apply other styles instead, that fit you best. What I described is just the closest to “remove all formatting” that you asked for.

f12 solved the numbering problem, and the fonts / default issue solved by using the drop down font menu in the left corner of the toolbar. For some reason Styles and Formatting does not work on my version of FO. I’ve tried it and f11 but there’s no response. I’ll redownload it if I have to, and check to see if there’s an update. But I think f12 and the font drop down will solve these issues, especially since I can save defaults.

Thanks for the help! Appreciated!

Not an answer, but rather a “me too”.

I have a Word doc I’ve pulled into Writer :

Version: 6.1.5.2
Build ID: 1:6.1.5-3
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3_kde5;
Locale: en-US (en_US.UTF-8); Calc: group threaded

Several repeating sections of text have “hard-coded” text characteristics that “Clear Direct Formatting” won’t touch. Setting the Paragraph Style to Default Style doesn’t help, nor does setting the Character Style to Default Style.

I can get around the issue by selecting and deleting the text, and then pasting it back as Unformatted Text (Ctrl-Shift-Alt-V), so it’s not a show-stopper, but I suspect a lot of users might not know to use that trick; selecting “Clear Direct Formatting” should clear ALL direct formatting, and setting styles should undo ALL other styles. This is, in my estimation, a bug.

1 Like

Nice! Would you be so kind to also mention which “hard-coded” text characteristics you are talking about? talking about a bug, could you please mention a bug number you filed about it, with a sample attachment?

I don’t see what year these posts were made, but as it’s not yet May 19 (or is that May of 2019?), it’s had to at least been a year since I wrestled with this issue (it’s now 2024).

And here I am again, with the exact same problem.

I have some text in LO that I copied/pasted from Facebook. It has a purplish color and is underlined. The paragraph style is default; the character style is none; I’ve hit “Clear Direct Formatting” repeatedly. I’ve checked to make sure there’s no bullets/lists applied. Where is this color and underlining coming from?

Sure, I can hit every piece of text to turn off underlining and to change the color, but why is that necessary?

I just now (this year) found the Format/Spotlight feature; when I turn on each of the three options, individually, they display exactly that the paragraph style is default, and the character style is none, and there is no direct formatting. The Styles menu also indicates default/none/no lists.

And “no” to @ajlittoz; the OP does not want “text formatted in a personal specific way”; what the OP wants is to have the text without formatting, the exact same way he gets if he cuts the text and pastes it back in with “Paste Unformatted Text” (which works, btw). I expect “Clear direct formatting” to clear the formatting of the text so that it is “unformatted text”.

This really makes me yearn for the old days of WordPerfect, when you could “Reveal Codes” and see exactly what formatting is getting in the way of what you want. Maybe LO offers something similar, but I’ve yet to find it. Something is formatting this text; all I want to know is what that something is, and how to kill it with fire.

Without a sample of your document, it is hard to guess. However, purple text with underline makes me think of URL. Writer has some heuristics to identify URLs (http(s):, mailto: or e-mail addresses). It then applies in a layer above styles and direct formatting built-in character style Internet Link.

You can check by altering said character style to see if formatting changes.

You can also right-click on suspect purple text and Remove Hyperlink. This contextual menu entry does not exist if there is no hyperlink.

You can also suppress automatic recognition in Tools>AutoCorrect>AutoCorrect Options, Options tab. Untick URL Recognition.

Should my guess be wrong, attach a sample file.

formatting_example.odt (14.2 KB)

This is a redacted form of the document, that exhibits the issue.

When I close LO, and then re-download the file I just uploaded it, and open it in LO, and hover over the colored/underlined text, it now shows a pop-up window indicating this to be a hyperlink. This is the first time I’ve seen that pop-up.

Turning off the autocorrect for URLs does not seem to affect these things, though.

Without that pop-up, I’m not sure how I would have known it was a hyperlink. Nor do I readily see a way to remove the hyperlink aspect of that text.

(And why are my posts here not recognizing paragraph breaks properly? Odd.)

Ah; highlight the text and right-click; Remove Hyperlink.

And you can even Ctrl-A to remove all hyperlinks! Yay!

I think you’ve found the issue, @ajlittoz ! Thank you!

1 Like

Your document has a lot of direct formatting as shown by the Style Inspector but the issue is not there nor with URL recognition.

An hyperlink has been explicitly added with Insert>Hyperlink (or was present in the formatted data you pasted from somewhere else). This hyperlink has been converted into Writer attributes. This illustrates the importance of Paste as Unformatted Text if you really don’t want any meta-attribute embedded in the data.

Right-click on purple underline text (without selecting it) and Remove Hyperlink if this is what you want.

In case you want to keep the hyperlink but are bothered with purple+underline, customise character styles Internet Link and Visited Internet Link.

1 Like

This “Style Inspector” sounds interesting. So I looked in Help | LibreOffice Help, and searched for “style inspector”, and found that the sidebar has this tool. (The icon in the Help does not match the icon in my sidebar, but the hovertips allowed me to find the tool.)

This tool indicates, sure enough, that the text is a hyperlink URL, applied as a “Character Direct Formatting”.

There are several ways I could have learned about this hyperlink, but none of them were obvious to me. Further, being a “Character Direct Formatting”, I would expect that “Clear Direct Formatting” would, you know, clear this direct formatting.

Meh. You live; you learn.

Thanks for your help!

Btw, I think your suggestion to always (unless otherwise desired) use “Paste as Unformatted Text” is the smart way to go, even if middle-click (on Linux) or Ctrl-V is more intuitive. I just need to learn/remember Ctlr-Alt-Shift-V.

Clear Direct Formatting is not a panacea. It has a rather restrictive range. From personal experience, it really handles only typographical and geometric attributes (font parameters, paragraph spacing and indents, … – approximately what is found in character and paragraph styles) but has no effect on text flow, list attribution and numbering, links (as you discovered) and many others I don’t remember right now.

I think term “direct formatting” should be replaced by a more appropriate word in the menu command, but I can’t find a good one to better describe the limits.

This limit is yet another reason to avoid direct formatting as much as possible to avoid unexpected results.