How to embed a Google Drive folder into a webpage?

To embed a Google Drive folder into a webpage:

  1. Open Google Drive.
  2. Right-click the folder you want to embed.
  3. Select Share.
  4. In the General access section, set the access to Anyone with the link.
  5. Copy the link and click Done.   
  6. You'll receive a URL like this:

https://drive.google.com/drive/folders/1qGwpjmQIQO8rN1odas0njDSf72VRrTCa?usp=sharing

The folder ID is the bold part: 1qGwpjmQIQO8rN1odas0njDSf72VRrTCa.

To embed the folder, use the following iframe code, depending on the view you prefer:

List View:

<iframe src="https://drive.google.com/embeddedfolderview?id=FOLDER-ID#list" style="width:100%; height:600px; border:0;"></iframe>

Grid View:

<iframe src="https://drive.google.com/embeddedfolderview?id=FOLDER-ID#grid" style="width:100%; height:600px; border:0;"></iframe>

Replace FOLDER-ID with the actual folder ID from your link.