It’s quick and easy to get the ID of a Google Spreadsheet or Sheet Tab from its URL. If you have the sheet open in your browser, you should be able to see the URL within the address bar. The Spreadsheet ID comprises letters, numbers, hyphens and underscores and is the part of the URL after the
docs.google.com/spreadsheets/d/ and ends before the next
When you open a Google Sheets file from your drive or computer, you probably think of this as a ‘Sheet‘. But actually the more correct terminology for it is a ‘Spreadsheet‘. Within your ‘Spreadsheet’ there may be one or more tabs or ‘Sheets‘.
The ID of the currently focused sheet within the spreadsheet you have opened is also part of the URL, the bit after
gid=. You can see both parts highlighted in the URL in the address bar of Chrome below.
Here are a few examples to highlight:
Example 1: Sheet URL:
https://docs.google.com/spreadsheets/d/1QPvcIcmNU1QbZYRF__rrjIC4C1F0Ir3KI-YtIRCCWws/edit#gid=0Spreadsheet ID =
1QPvcIcmNU1QbZYRF__rrjIC4C1F0Ir3KI-YtIRCCWwsSheet ID = 0 (zero usually means this is the first or only tab in the spreadsheet) Sheet URL:
https://docs.google.com/spreadsheets/d/1vqnkf65XGiFzr3UHETkKA0qjnwSYHPzUI4vjUJJKW0E/edit#gid=1930268077Spreadsheet ID =
1vqnkf65XGiFzr3UHETkKA0qjnwSYHPzUI4vjUJJKW0ESheet ID =
Getting a sheet ID from the sheet URL
There’s a really quick way of selecting the spreadsheet ID or sheet ID from the URL shown in your address bar. Normally, if you simply double click on the section of the URL that contains the ID you want, it will automatically get selected. So you can quickly copy it using Ctrl+c or ⌘ + c. The exception to this is when the ID contains hyphens (-). These mean you can only quickly select PART of the ID quickly and have instead to drag or cursor between the first / and last /.
Getting a sheet ID from Google Drive
If you open your Google Drive in a browser and right-click on a Google Spreadsheet file, you will see a menu that has a Get link option.
If you open this option, you will see the sharing settings window for the file. This window domains a Copy link button, this button will copy the URL of your sheets file to the clipboard.
All you then need to do is paste the URL into your favorite text editor and extract the sheet ID!
Getting a sheet ID on mobile
The same Copy link button is available when you use the three dot button next to a file on your mobile drive app. If you copy a link to the sheet, you can then extract the spreadsheet ID.