Making Endnotes from Footnotes

Update 12.22.2016 Since this has become quite a popular script, I've converted it into a Google Docs Add On so it can be used across documents. Check out the blog post or the Endnote Generator website for more information.


Update 8.27.2016 As Phil noted in the comments, the script didn't format anything over two digits in length. That has been corrected in the source. If you need more (100+ endnotes may be too many, though...) leave a comment and I'll go back and make the changes.


Krissy Venosdale asked on Tuesday if there was a way to make endnotes in Google Docs as easily as footnotes. I thought, "Surely there is."

Well, there's not.

So I wrote a script that does it.

It's hosted on GitHub along with instructions on how to install the script (it's not an add-on...just a custom script) and run it in your document.

Here's a peek:

When you add the script to the document (manual process right now - read the instructions) it adds a custom menu from which you run the script.

I know endnotes and footnotes aren't really used in high school, but if you're writing a book or something...maybe it'll be helpful to you.

Either way, it was fun to write and it works pretty quickly. I haven't tested it with documents more than a few pages long, so if you're going to try it on something major, I'd suggest making a duplicate copy to run it on first, just in case.

I'm a teacher by day, after all.

24 thoughts on “Making Endnotes from Footnotes

  1. Dagmar2000 says:

    Thanks! This helped for a research paper I’m formatting. :)

  2. Phil says:

    Script is great but for notes >2 digits the superscript only works for the first digit. As a result the formatting is off. Any help?

    • Brian Bennett says:

      Honestly, in my testing, I only tested a handful of notes. I’ll take a look at it this week and update the script. Thanks for the heads up.

  3. Amanda Anderson says:

    I’m working on a book and would love to use endnotes instead of footnotes. You REALLY should sell this to google. You could make so much! I know there is a huge demand and frustration by writers who want endnotes.

    • Brian Bennett says:

      Hi Amanda,
      I think someone at Google could code this in a fraction of the time, so I’m not sure how much it’s _actually_ worth to them. But, I’m glad you’re finding it helpful! I need to update the post, but like Phil mentioned, there was a problem with more than 9 footnotes (10+ wouldn’t format properly). That’s now fixed, so grab a new copy of the script from GitHub to get the update.

  4. Luke says:

    This looks great – I think you underestimate how useful this is – a lot of academics use Chicago and other citation styles that are endnotes, rather than footnotes. Yes Google could code this themselves but they haven’t, and they’re notoriously slow at responding to even very popular requests, so thanks.

    • Brian Bennett says:

      Thanks Luke. I’m glad you found it useful! One thing I’d like to do, if I can find the time, is turn it into an Add-On so you don’t have to manually copy and paste the script into a doc when you want to use it. If I can get around to making that happen, I’ll post an update to this article (and probably write up a new post). Please let me know here, or on GitHub in the Issues tab, what I can do to make it work a little bit better for you.

  5. Katie says:

    Thank you very much!

  6. Cube says:

    Hi, thanks so much for making this. When I attempt to run the program, I get the following error message:

    “TypeError: Cannot find function editAsText in object Footnote.”

    Any idea what I might be doing wrong?

    • Brian Bennett says:

      Hmm…not sure. I’ll take a look and follow up.

    • Brian Bennett says:

      I just tested it in a new doc and didn’t get any errors. Make sure you have footnotes created before running the script. If there isn’t any footnote in the doc, it doesn’t have anything to work with.

  7. Caitey says:

    This helps a bunch with my finals! thanks so much!!!!

    • Brian Bennett says:

      Awesome! Glad to hear it’s helping.

      I’m sure you’ve seen with some other comments that it can run into some wonkiness with a high number of footnotes. If something weird happens, feel free to leave another comment here and I’ll look into it.

  8. Magen says:

    So I’ve deleted out the text, pasted the script, saved, closed out of both the script and my paper, and reopened my paper. When I go to run the script, it gives me four options: onOpen, newEnd, deleteNotes and replaceNotes….I had to have done something wrong. Also, when I deleted the text out of the box, it has all of this:
    function myFunction() {

    }

    Maybe my problem is that I am not pasting my script in the correct place.
    If I can figure this out, this is AWESOME. I hate that google drive doesn’t have endnotes!!!

    • Brian Bennett says:

      Hey Magen,
      Once you reload the document, you have a new menu item in the Document called “Create Endnotes”, not back in the script editor. Run the script from that menu item and you should be good to go.

      • Magen says:

        Thanks for the reply! That didn’t work for me either for some reason, but it’s okay, I went ahead and just manually moved them all. It was a 22 page research paper and I had about 76 sources, so I was just being lazy, and I hadn’t slept in 26 hours, hence the lazy. Finals week. Whew.

        • Brian Bennett says:

          “only” 76 sources. That’s still too many!

          Would you mind sharing a doc (doesn’t have to be your paper) that you’ve tried adding the script to so I can see what’s going on? Curious if there’s a problem I need to address.

  9. Magen Schlesier says:

    I edited the final paper in Google Docs, but here is one of our incomplete drafts with footnotes. There’s a little over 40 in this one. I made it available to edit for anyone with this link so you can play with it. I turned in our final one already so I don’t need this one anymore. Feel free to use it anytime for your script. Let me know if it gives you any trouble!

    https://docs.google.com/document/d/1KETr6vdqcDzmy4hNOm4r8e_OJXJMfdkoxo7Pq6YueyE/edit?usp=sharing

    • Brian Bennett says:

      Aha! You added a footnote to an image and the script doesn’t check the type of item before making changes. Not your fault, something I didn’t add in there (because I’d never put a footnote on an image before).

      I’ll make the changes in the script and then update this post to reflect the update. I’ve also considered making this an AddOn because it’s been really popular. I’ll update the blog with that info when/if it happens.

  10. […] year ago, I posted a script which converts footnotes in a Google Doc into endnotes. I've gotten great comments and feedback and […]

  11. Shirley says:

    Hmm…can’t get it to work. Directions are not very clear for us who simply don’t know exactly what the formula should look like. I am not getting the new menu item “Create Endnotes”.

  12. Shirley says:

    No sooner than I posted my response, I found that there is an endnote generator add-on that works perfectly in Google Docs! Hooray!

Leave a Reply

Your email address will not be published. Required fields are marked *