Once you add a header to a Google document, it offsets the top of the document even if empty, and receives click events. How can you then remove the header?

I am aware that you can reduce the header's effects by decreasing the page's top margin, and reducing the font size in the header—those are not the solutions I am looking for. I would like a way to actually REMOVE it.

  • To be clear: I'm also not looking for "Control+z/Edit->Undo" or the like.
    – trex005
    Jan 29 '15 at 15:36


There's an Add-on available that removes the header or footer in the active document only once added:

Documents by Top Contributors

enter image description here

Goto your Google Document and choose from the menu Add-ons > Get add-ons... and search for:

enter image description here

Affiliation: I wrote the add-on

The following line of code will reset the header (gray line disappears).


function onOpen() {
  DocumentApp.getUi().createMenu("Header / Footer")
    .addItem("Reset header", "resetHeader")
    .addItem("Reset footer", "resetFooter")

function resetHeader() {
  try {
  } catch(e) {
    throw "No header present !!";

function resetFooter() {
  try {
  } catch(e) {
    throw "No footer present !!";


enter image description here

enter image description here


I've noticed that after running the script (and thus removing the header or footer), adding them wasn't possible on the document I was working on.

Add the code under Tools > Script editor..., press the bug button to authenticate the script and then press the play button. This will "play" the code and reset the header.

See Google Help Forum for an extensive walk-through: How to remove the header in Google Docs?

  • 1
    Was a little awkward of a solution, but it worked like a charm. I blame the awkwardness on Google.
    – trex005
    Jan 29 '15 at 19:48
  • Doesn't work: TypeError: Cannot call method "removeFromParent" of null. (line 2, file "Code"). Sep 27 '15 at 13:09
  • @fossilet: It needs to have a header in the first place. Did you have a header? Sep 27 '15 at 13:17
  • @JacobJanTuinstra, I had a footer instead. Maybe I should change the function names? Sep 28 '15 at 13:11
  • 1
    This worked for me, and really saved the day. Thanks!
    – JHS
    May 3 '16 at 2:39

All you need to do is copy all your text and then get a new doc. Paste it onto there and you're done

  • 4
    This doesn't really answer the question.
    – jonsca
    Apr 12 '17 at 1:29
  • 2
    @jonsca It does actually, because there's no way to remove it (other than some script, which I won't count). Scripts are utterly stupid way to achieve this for the same reason as why you won't write a script to remove the bold from a line of text. No idea what they were thinking implementing the headers but not implementing removing them (WTF stuff right there).
    – Achshar
    Oct 22 '17 at 22:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.