How to Share an HTML File in Google Drive as a Web Page
Quick answer
Google Drive shares your .html file as code or a download, not a live page, because Drive stopped hosting web pages in 2016. To share it as a page, publish the HTML file and send that link instead. Convika does this free, and a private link (Pro or pass) keeps the page out of search results.
Free plan: no credit card, 1 published page, 10,000 page views a month, and a small Convika bar at the bottom.
On this page
- Why your HTML file in Google Drive shows code or downloads instead of opening
- Three ways, by goal: view it yourself, send the code, send the page
- How to open an HTML file from Google Drive in Chrome
- How to Share an HTML File in Google Drive (and What the Other Person Gets)
- How to turn your HTML file into a page link in 4 steps
- Keep your page to the people you send the link to, or add a password
- Why images or styles are missing when you share an HTML file (and how to fix it)
- Ways to Show HTML Inside Google (Google Sites and Apps Script)
- Frequently asked questions
- Sources
You uploaded an .html file to Google Drive, set the link to Anyone with the link, and sent it out—only for the other person to see a wall of raw code or a download prompt instead of your web page. Google Drive ended web hosting through googledrive.com/host on August 31, 2016, and while Drive still lists .HTML among the file types it can preview alongside .CSS and .JS, it treats your file as markup and code rather than a live site.
This guide covers what Drive actually does with an HTML file, three ways to share it depending on your goal, and how to view the file yourself using Chrome (Ctrl+O on Windows/Linux or Cmd+O on Mac) or Convika's free HTML viewer (/tools/html-viewer/). You will also see what a Drive share link gives the other person, the 4 steps to get a working page link, how to keep it limited to the people you send it to, why images don't show when shared from a folder, and how to use Google Sites or Apps Script when you want to stay inside Google's tools.
Why your HTML file in Google Drive shows code or downloads instead of opening
Google Drive does not host or render web pages from shared file links anymore—it stopped serving files as live websites through googledrive.com/host on August 31, 2016. Today, Drive lists .HTML under markup and code files (alongside .CSS, .JS, .PHP, and .py) and only shows a scaled-down preview rather than running the file like a live webpage.
- Download and open it on a computer: Right-click the file in Drive and click Download (enabled for viewers by default unless the owner turned it off). Then open it in Chrome with Ctrl+O on Windows or Linux, or Cmd+O on Mac; opening the file from its own folder lets it run scripts and load local files stored next to it.
- Preview it locally without uploading: After downloading, open the .html file in Convika's free HTML viewer (/tools/html-viewer/), which renders it in the browser on your device so only you see it. If someone else sent you the file, only open it if you trust the sender, and untick Run scripts first to inspect the code.
- Publish it through Google tools: To share a live URL from Google, paste your HTML, CSS, or JavaScript into Google Sites via Insert > Embed > Embed code (note that a Convika page cannot be embedded inside Google Sites or any other site; link to it instead), or serve the page through Google Apps Script's HTML service by adding the HTML file, writing a doGet function, and choosing Deploy > New deployment as a web app.
When you share an HTML file—by selecting it, clicking Share, setting General access to Anyone with the link (unless a work or school account restricts outside sharing), and copying the link—the recipient only gets access to that file preview or a download. To actually view the rendered page instead of raw code, you or your recipient can use one of these options:
Three ways, by goal: view it yourself, send the code, send the page
Google Drive stopped hosting web pages in August 2016, when googledrive.com/host shut down. Today, Drive lists .HTML under markup and code files and shows a scaled-down file preview, so a shared Drive link gives the other person raw code or a file download instead of a live web page. Pick the method below that matches what you actually want to do with your file.
| Goal | How | What the other person gets |
|---|---|---|
| View it yourself | Download it from Drive and open it in Chrome (Ctrl+O or Cmd+O) or the HTML viewer | Nothing: only you see it |
| Send the file | Drive's Share, then Anyone with the link and Copy link | The file: Drive's preview, or a download |
| Send the page | Publish the file and send its link | The page in their browser, with no account |
If you only need to hand over the .html file for someone to download or inspect, a regular Google Drive link with Anyone with the link set to Viewer is enough. If you want them to click a link and see the working page in their browser on a phone or computer, upload the single .html file in the box at the top of this page to get a shareable link—or use Google Sites or Google Apps Script if you want to stay inside Google's tools.
How to open an HTML file from Google Drive in Chrome
Google Drive lists .HTML under markup and code file types and shows only a scaled-down preview of the file. Because Google shut down Drive web hosting (googledrive.com/host) on August 31, 2016, opening a Drive link in Chrome will not render the file directly as a live web page.
- In Google Drive on your computer, right-click the .html file and click Download (if the page uses separate CSS, JS, or image files, download those into the same folder as well).
- Switch to Chrome and press Ctrl+O (Windows, Linux) or Cmd+O (Mac), then select the downloaded .html file from its folder so it can run its scripts and load the files next to it.
- Alternatively, open the file in Convika's free HTML viewer (/tools/html-viewer/) to view it in your browser without uploading it; if someone else sent you the file, open it only if you trust the sender, and untick Run scripts first to look inside.
To view the page in your own browser, download the .html file to your device first (viewers can download shared files by default unless the owner turns downloading off). Once downloaded, you can open it directly in Chrome or preview it locally in Convika's free HTML viewer (/tools/html-viewer/), which opens the file in the browser on your device without uploading it—only you see it.
How to Share an HTML File in Google Drive (and What the Other Person Gets)
Sharing an .html file from Google Drive gives the other person Drive's file preview or a download—not a live webpage. Google ended web hosting in Drive on August 31, 2016, when googledrive.com/host shut down, and Drive's help now groups .html under markup and code previews alongside .css, .js, and .py, noting only that the preview is a scaled-down version of the file without specifying whether it renders the page, shows raw code, or runs scripts.
- Select your
.htmlfile in Google Drive and click Share. - Under General access, change the setting to Anyone with the link (if your work or school account allows sharing outside your organization).
- Choose a role—Viewer, Commenter, or Editor. Viewers can download the file by default without signing in to a Google account, unless you turn downloading off in the share settings.
- Click Copy link, then click Done, and send the link to the other person.
If you just want to hand the file to a teacher, classmate, or coworker, a standard Drive link lets them view the code or download the .html file to open in Chrome on their computer with Ctrl+O (Windows/Linux) or Cmd+O (Mac), or inspect it locally in Convika's free HTML viewer (/tools/html-viewer/) without uploading it (if someone sent you the file, open it only if you trust the sender and untick Run scripts first). If you need the link to open directly as a working webpage instead, paste the HTML, CSS, and JavaScript into Google Sites via Insert > Embed > Embed code, or serve the HTML file from Google Apps Script using a doGet function and Deploy > New deployment as a web app.
How to turn your HTML file into a page link in 4 steps
Google Drive opens an .html file as raw code or downloads it instead of showing the webpage. Follow these 4 steps to host the file on Convika and share a link that opens directly in any browser.
1. Download the file from Google Drive and drop it in the box
Convika can't read a file straight from Google Drive, so download it to your computer first (right-click > Download). Then go to the box at the top of this page. With Upload a file selected, drop one .html or .htm file up to 2 MB into the box—or switch to Paste code and paste the code. Click Get my preview link. You don't need an account or an email. Note that Convika takes a single HTML file, not a folder or a ZIP: files sitting next to it on your computer (like a style.css file or an images folder) won't load, though images built into the file or pointing to https:// addresses will show.
2. Keep the page and check how it runs
Without an account, your preview link works for 3 minutes, and scripts and forms are turned off in the preview. To keep the page and let its scripts run, click Keep this page — free, no card and sign up. The page moves into your account just as you uploaded it. On a published page, your scripts and libraries from an https:// CDN run on every plan, Free included (though a page can't fetch data from other websites). The Free plan requires no credit card and includes 1 published page, 10,000 page views a month, and a small Convika bar at the bottom of each page.
3. Publish your page
On the page's screen, click Publish. The confirmation offers Public, Private link, or a password. Public is free: anyone with the link (including anyone they forward it to) can open the page without a password or an account, and it may show up in search results and in Convika's gallery. A Private link (Pro or pass) opens the same way, while Convika tells search engines to keep the page out of their results and keeps it out of the gallery. If you want a page password (Only people with the password), visitors see a password screen first. It is a Pro feature ($12 a month).
4. Copy the link and send it
Your page goes live at an address like yourpage.convika.page, which stays the same until you click Unpublish. Free includes 10,000 page views a month across all your pages. Click Copy next to the Live URL and send the link to your teacher, classmate, or coworker—they can open it in their browser on a phone or computer with no Convika account. You can check your page analytics to see visits by day, country, device, and where visitors came from (showing how many people visited, not who, for the last 90 days on the Free plan). If you need to fix the page later without changing the link you already sent, go to the page's screen under New version from a file, drop the updated file, and click Upload as a new version, then Open preview, and then Publish v2 at the same link. Visitors will keep seeing the live version until you publish the update.
Keep your page to the people you send the link to, or add a password
In Google Drive, "Anyone with the link" keeps a file off Google search while letting people with the link open it. When you publish a page in Convika, the confirmation gives you Public, Private link, or a password. Public is free, but the page may show up in search results and in Convika's gallery; a Private link (Pro or pass) gives you that same link-only setup.
- Private link (Pro or pass): Anyone with your
yourpage.convika.pagelink can open the page on a phone or computer without a password or a Convika account—including anyone they forward the link to. Convika tells search engines to keep the page out of their results and keeps it out of the gallery. On the free plan, choose Public: the page opens the same way, but it may show up in search results and in Convika's gallery. - Only people with the password (when forwarding is a problem): For a client draft or private class work, choose Only people with the password when publishing so visitors see a password screen first. Page passwords are a Pro feature ($12 a month).
- Take it down when you're done: Your page keeps its address until you click Unpublish on the page's screen, which closes access immediately.
The difference is what happens if someone forwards your link. Use the list below to choose between link-only access, adding a password, or taking the page down when a review or grading period ends.
Why images or styles are missing when you share an HTML file (and how to fix it)
If your HTML file looks fine on your computer but loses its pictures or styling when you share it, the code is pointing to separate files in a folder on your device—like src="images/photo.jpg" or a separate style.css file. Sharing a single .html file in Google Drive or uploading it to Convika only sends that one file, not the folder or a ZIP next to it, so those local images and stylesheets get left behind. Convika's upload box in the box at the top of this page will warn you right away if your page links to files on your computer.
Put all the CSS inside the HTML file and use https:// addresses for the images, so the page is one file.
The easiest fix is to combine everything into a single HTML file: copy the prompt below and paste it into the AI that made your page, or edit your code so all CSS sits inside a <style> tag and images use full https:// web addresses (small images can also be built directly into the file, as long as the total file stays under 2 MB). Once you have your single file, drop it into the box at the top of this page to get a preview link, or if you already published the page on Convika, open the page's screen, drop the updated file under New version from a file, click Upload as a new version, check it with Open preview, and click Publish v2 at the same link.
Ways to Show HTML Inside Google (Google Sites and Apps Script)
Google Drive no longer hosts live web pages—its old googledrive.com/host feature was shut down on August 31, 2016, and Drive's built-in preview treats .html files as markup and code rather than rendering a live page. If you want to stay inside your Google account and share a working page instead of raw code or a file download, you have two built-in options: Google Sites and Google Apps Script.
- Google Sites (Insert > Embed > Embed code): Best when you want to place a self-contained piece of HTML, CSS, or JavaScript inside a page on a Google Site. You copy the code from your
.htmlfile and paste it into the embed box rather than linking the file from Drive. It works well for a single widget or snippet, but your code runs inside an embedded frame on a Google Sites layout rather than as your own standalone.htmlfile, and a Convika page cannot be embedded inside Google Sites or any other site (link to it instead). - Google Apps Script (HTML service): Best if you want Google to serve your HTML as a standalone web page at its own link. You create an Apps Script project, add an HTML file inside the script editor, write a
doGetfunction to serve it, and click Deploy > New deployment as a web app to get a shareable URL. The trade-off is setup effort: it requires writing thedoGetscript and managing web app deployments, and if you are on a work or school Google account, your organization may restrict sharing outside the organization.
Both tools run inside Google and let you share a link, though neither works by simply clicking a .html file sitting in a Drive folder. Instead, you paste your code into them. Here is what each tool can do and where its limits are:
Frequently asked questions
How do I share an HTML file in Google Drive?
Select the file in Google Drive, click Share, choose Anyone with the link under General access, pick a role (Viewer, Commenter, or Editor), and click Copy link and Done. Anyone with the link can access the file without signing in to a Google account, unless a work or school account blocks sharing outside the organization. Because Google Drive no longer hosts web pages, the other person will get a code preview or a download rather than a live site. To let them open the rendered page directly in their browser, upload the file in the box at the top of this page and share a Convika link instead.
Can Google Drive host HTML?
No, Google deprecated web hosting in Drive on August 31, 2015, and stopped serving pages through googledrive.com/host on August 31, 2016. Today, Drive only stores your .html file for downloading or viewing as a scaled-down preview. If you want to stay in Google's tools, you can paste HTML, CSS, or JavaScript into Google Sites via Insert > Embed > Embed code, or deploy an HTML file as a web app using Google Apps Script's HTML service. To host a single .html file at its own address without coding a script, drop it into the box at the top of this page and publish it for free on Convika.
Why does my HTML file download instead of open?
Google Drive treats an .html file as a stored code file rather than a live web page, since Google ended Drive web hosting on August 31, 2016. While Drive lists .HTML among the markup and code files it can preview, viewers often have to right-click and download the file to render the page properly. Once downloaded to a computer, it can be opened in Chrome with Ctrl+O (Windows, Linux) or Cmd+O (Mac) so its scripts and local files run. If you want people to open the page directly from a link on a phone or computer without downloading it, upload the file in the box at the top of this page.
How do I view an HTML file in Google Drive?
Click the file in Google Drive to open Drive's built-in preview, which Google describes as a scaled-down version of the file that may appear slightly different when opened. To view the full page and run its scripts, right-click the file in Drive, click Download, and open it in Chrome from your computer with Ctrl+O (Windows, Linux) or Cmd+O (Mac). You can also view a downloaded .html file in your browser on your device without uploading it by using Convika's free HTML viewer. If someone else sent you the file, open it only if you trust the sender, and untick Run scripts first to look inside.
How do I share an HTML file with a link?
Drop one .html or .htm file (up to 2 MB) into the box at the top of this page and click Get my preview link for a preview link that works for 3 minutes with no account or email required. To keep the page and enable its scripts, click Keep this page — free, no card, sign up, and click Publish. Your page goes live at an address like yourpage.convika.page as Public on the free plan, so anyone you send the link to can open it on a phone or computer without a Convika account. A Public page may show up in search results and in Convika's gallery; to keep it out of both, choose Private link (Pro or pass) when you publish. The Free plan needs no credit card and gives you 1 published page and 10,000 page views a month.
Sources
- Google Drive Help: Files you can store in Google Drive (checked October 18, 2026)
- Google Drive Help: Share files from Google Drive (checked October 18, 2026)
- Google Workspace Updates: Deprecating web hosting support in Google Drive (August 31, 2015) (checked October 18, 2026)
- Apps Script: HTML Service, create and serve HTML (checked October 18, 2026)
Next step
How to password protect an HTML page without code, on your own domain
JavaScript passwords sit in the page code. Put an HTML page from ChatGPT or Claude behind a server-checked password on your own domain.
Related articles
- How to share an HTML file as a link that opens on any phoneEmail and Google Drive open HTML files on a phone without scripts. Compare 5 hosts (Netlify Drop, Tiiny Host, GitHub Pages, Convika) and follow 4 steps.
- Submit an HTML file in Google Classroom so your teacher sees the pageClassroom takes an HTML file, but the teacher gets the file. Hand in a link to the page instead. Teachers post a game for their class the same way.
- How to Send an HTML File by Email (Gmail, Outlook, or Link)Gmail and Outlook let you attach .html files, though work filters can block them and mail apps may show code. Or publish it and email a link instead.
- Share an HTML file in Teams and have it open as a pageTeams keeps an HTML file in SharePoint or OneDrive, which will not run scripts. Post a link to the published page for colleagues or a class team.