Find Your Spreadsheet ID in Google Sheets

Learn how to find the unique ID of your Google Sheets document and its individual tabs, which is essential for various functionalities and integrations.

Here's how to get the ID of your Google Sheet. So every single Google sheet, no matter what has an id, and that's a very unique number that only pertains to this exact sheet, and it's up in the URL. So if you go to URL Bar, you can see a URL here, docs.google.com. Slash spreadsheets slash D. And then after the D, there's a slash, and then this is the id and it goes to the next slash. So this one is very complicated. It's 1D PPM, capital VXK, onward and onward. At the end of the URL is going to be another slash and then edit. Then some other information. So this GID, actually it says zero for here, but if we create a new tab, you'll see that this one has the exact same ID of the entire

spreadsheet , but it has a different GID. This GID is 9 1 4 7 1 1 and 0 3 8. This is a unique number that is created for each and every new tab. The very first tab of your sheet's gonna have a GID of zero. So the entire spreadsheet has an id and then also each of the tabs has an id, A GID. So you do need to know that. But just grab the ID right here between these two slashes. Now, in this particular case, there is a hyphen, so if I double click on the id, it's not highlighting the entire id. Let's create a new sheet sheet.new. And see if that actually has also a hyphen. Let's do sheet again and another hyphen here so we have hyphens.

Just make sure you have the entire id, which may include a hyphen when you select it all, but there's where you can find your ID of your sheet. One extra way You can do this and I will do it in extensions app script . We are gonna create a function called GI Sheet id , spreadsheet , app, do gi, active spreadsheet , GI id, and that's all you need to see the id. So we can, we can logger log this inside of here. Let's run it and we're gonna have to authorize it. And there we go. We have this id, which we can look back on our sheet and see. It is the exact same ID in the URL, so that's one extra way to get the id. We can do variable ID equals.

And set this spreadsheet up there and logger log ID and get exactly the same thing. There we go. So hope you, hopefully you enjoyed going a little bit deeper into getting the ID of your spreadsheet . You are watching better sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But for right now, right here, one of these videos is gonna be your next Google sheet.