Google Docs Unique ID

This post may not seem like anything mind blowing, but it is something you might need to know for other things.

When you create a Google Document a UNIQUE code is generated. Clearly the URL for one Google Doc could not be the same as the URL for a different Google Doc, or how would the web know where you want to go?

The unique code is hidden in the URL, it is a long string of numbers and letters (no symbols!)

Sometimes I need this unique code in order to reference to a different document. For example when using the =importrange( formula in a Google Spreadsheet you want to bring one spreadsheet into the other spreadsheet. You will need the unique ID of the 2nd spreadsheet to bring it into the first.

Unique ID for a Spreadsheet

https://docs.google.com/spreadsheet/ccc?key=0AiqrAI5UxSJNdDREd3ZEUzhmWkV5Yi1JTXNCMERlakE#gid=0

The key is after the key= but before the #gid.

Unique ID for a Google Document

https://docs.google.com/document/d/1zbROHciKTWxQ2BR2cVO2VxR_fR1jmg1XstdhduUGqug/edit

The key is after the slash but before the /edit

Unique ID for a Google Drawing

https://docs.google.com/drawings/d/1KOGtaTsWxgKcYBHOWotjh8SX4pdSsFAhZVEZtxq0AgQ/edit

Same as for the Google Doc, the Google Drawing is after the slash but before the /edit.

Unique ID for a Google Presentation

https://docs.google.com/presentation/d/1fq6o7aUA4C8kHNbs34ugXByQ7rQwttoM8DjlVuAZ7q0/edit#slide=id.p

At the end of the Google Presentation URL is a reference to the slide. The unique ID is in the middle of this long URL. After the slash but before the /edit and slide info.

9 thoughts on “Google Docs Unique ID”

  1. I think this is where I am having trouble-I tried to set up a spreadsheet and use importrange to pull in a roster from the first sheet on other sheets. But then when I used the /copy to force others to make a copy, that copy still seems to be linked to my original. Is there a way to add a roster that will carry over only on that copy though?

  2. Hi. Thanks for the excellent tip!

    Do you have an example of code to create a new doc (in my case, for new docs), with name and address info from a spreadsheet?

    Thanks!

  3. This site has been a big help tonight, hope I can give something back: Just found out the importrange function can be used as the range value in vlookup/hlookup.

    Hope this might be of some help.

    Regards

Leave a Comment

© 2026 All Rights Reserved.

Get effective EdTech strategies from Alice Keeler to build a more student centered classroom. Includes unique resources and templates.

Recent Teacher Tech Blog Posts

💥 FREE OTIS WORKSHOP

Join Alice Keeler, Thursday April 28th or register to gain access to the recording.
Create a free OTIS account.

Join Alice Keeler for this session for teaching with AI

Imagine having a team of teaching assistants who already know your syllabus and exactly how you like to give feedback. Join Google Certified Innovator Alice Keeler to learn how to use Google Gems to build a powerful collection of custom AI tools. We will explore how to engineer specific instructions so you can create a Grading Assistant or a Classroom Policy Manager that works for you. You will also learn how to leverage Gems shared by other educators to instantly expand your toolkit. This session is about super-powering your teaching by automating the routine tasks so you can focus on the students.

Exit this pop up by pressing escape or clicking anywhere off the pop up.