Guide Page 003

How to share an HTML file so people can open it

Google Drive treats an HTML file as code, SharePoint downloads it, and emailed files have to be saved first. Here are the practical ways to share your page so anyone can open it, and the catch for each.

The short answer

To let someone open an HTML file without downloading it, put it online at a link using a free host like Netlify Drop, Vercel Drop, Cloudflare Pages or GitHub Pages, or share it from Claude, ChatGPT or Gemini. Emailing the file works only if the recipient saves it and opens it in a web browser, while Google Drive treats it as a code file and Teams channel files (stored in SharePoint) download it.

Knowing how to share an HTML file matters as soon as ChatGPT, Claude, Gemini or Microsoft Copilot builds you a report, dashboard, one-pager or small tool and hands you an .html file. An HTML file is a page your web browser draws, so it works when someone opens the saved file in a browser or when it is online at a link. Your file is fine, even if the usual work tools did not open it as a page.

Why does my HTML file open as code or download instead?

Google Drive treats an HTML file as a code file and no longer hosts web pages, while Teams channel files sit in SharePoint, which downloads HTML files instead of opening them. Even after a download, the page can look broken if its images, styles or scripts were saved as separate files.

Google Drive lists .HTML as a preview type under "Markup/Code" with source-code files, so it treats the file as code rather than opening it as a page. Google deprecated web hosting in Drive on August 31, 2015, and stopped serving pages from Drive addresses on August 31, 2016.

Files posted in a Microsoft Teams channel are stored in the team's SharePoint (chat files live in the sender's OneDrive for Business). SharePoint Online downloads an HTML file with scripts or shows it as raw content instead of opening it as a page, and companies cannot switch this off.

A web page also finds its images, styles and scripts by file path. If those are separate files and do not travel in the same folder layout, the page cannot load them, which a single self-contained HTML file avoids.

Can you email an HTML file?

You can email an HTML file in Gmail and Outlook as long as it does not rely on a separate script file and your company's email filter allows it. The recipient has to save the attachment and open it with a web browser. Tell your recipient to save the file first, then open it in their browser.

Gmail does not block .html or .htm attachments, up to 25 MB on personal accounts (above that, it swaps in a Google Drive link; work and school admins set their own limit). However, Gmail blocks .js (script) files even inside a .zip, so a page with a separate script file cannot be sent through Gmail.

Outlook's built-in blocked list across Windows, Mac, web, iOS and Android excludes .htm and .html (it does block .mht and .mhtml). Still, a company's Microsoft 365 admin can add htm and html to the attachment filter, which by default rejects the message and sends a non-delivery report. For blocked types, Microsoft recommends a OneDrive link.

On an iPhone, the recipient touches and holds the attachment in Mail to save it to Files or open it in another app. Because the iPhone Files app lists only images and PDFs for Quick Look previews, they touch and hold the saved file and choose Open With.

Ask your AI

Put everything this page needs, including its styles, scripts and images, into one self-contained index.html file, so I can share a single file.

The fastest way to share an HTML file as a link is to drop it onto a free web host, which puts the page online at an address anyone can open in a browser. Netlify Drop is the simplest to try because it needs no account to start, though each free host has a catch for work use. Name the file index.html before you upload it; several hosts look for that name.

  1. Prepare your file. Save your single HTML file (named index.html), a folder or a .zip file on your computer.
  2. Drop it on Netlify Drop. Open app.netlify.com/drop in your browser and drag your folder, .zip or single HTML file onto the page.
  3. Claim the link to keep it. Netlify gives you a live link that is public by default without an account, but unclaimed anonymous uploads are removed after about an hour, so claim the site with a free Netlify account to keep it on the free plan as long as you like.

Vercel Drop (vercel.com/drop) requires a Vercel account: drop a file, folder or .zip, pick a team and project name, and select Deploy (if there is no index.html, Vercel asks which page to show first). The catch for work: Vercel's free Hobby plan is for personal, non-commercial use only.

Cloudflare Pages requires a Cloudflare account and takes a .zip or a folder, not a loose file. In the dashboard, go to Workers & Pages, then Create application, then Get started, then Drag and drop your files, and the page goes live at <project-name>.pages.dev.

GitHub Pages requires a home page named index.html (or index.md or README.md), and changes can take up to 10 minutes to go live. On GitHub Free the repository and site must be public on the internet, and GitHub does not allow Pages to be used as free hosting to run an online business.

Because Netlify Drop and GitHub Pages (on GitHub Free) publish your page to a public web address by default, read our guide on how to password protect a page you host if your page holds internal work.

How do you share an HTML file from Claude?

You can share an HTML page built in Claude by sharing the artifact link, provided the viewer has a Claude account and your plan supports link sharing. Otherwise, export the file and host it elsewhere.

Claude artifacts start private. On Claude on the web or Claude Desktop (not the iPhone or Android apps), open the artifact, click Share, choose Can view, Commenter or Can edit, and copy the link. On the Free plan, new artifacts cannot be shared by link; Pro and Max offer Only you or Anyone with the link (email invites are in beta); Team and Enterprise default to inside the organization and offer Only people invited, Anyone at your organization, or Anyone with the link if an Owner enables External sharing. Artifacts that connect to your apps or use Claude cannot use "Anyone with the link".

Everyone needs a Claude account to open a shared artifact, even with "Anyone with the link" (only legacy artifacts made before September 16, 2026 and published with Publish open without an account). To host it elsewhere, export a design artifact as standalone HTML (or .zip, PDF or PowerPoint), or use the top panel controls on a legacy artifact to view, copy or download the code.

What about HTML from ChatGPT or Gemini?

In ChatGPT you can preview HTML code blocks in the chat or publish a live page with ChatGPT Sites on eligible paid plans, while in Gemini, Canvas can build a web page and share it by a link that opens only on gemini.google.com.

OpenAI removed canvas from its current models (GPT-5.5 Instant and Thinking) on May 28, 2026, so code now appears in code blocks where you can select Preview for HTML pages or copy the code (paid users still have limited-time canvas access via legacy models). Shared conversation links from personal accounts open for anyone, while Business, Enterprise and Edu links open only for workspace members.

ChatGPT Sites builds and hosts interactive sites and lightweight apps at their own web address on Plus, Pro, and supported Business and Enterprise workspaces (not Free or Go), created in Work on ChatGPT on the web or desktop app. New Sites start visible only to the owner and workspace admins; public Sites open without a ChatGPT sign-in (off by default in Enterprise unless an admin turns it on), while invited outside viewers sign in with their invited ChatGPT account for view-only access.

In Gemini Canvas, create a Web page, then at the top right select Share & export, then Share, and copy the link (on work accounts, if your admin allows sharing). Shared Canvas links open only on gemini.google.com, not in the mobile app, and anyone with the link to a shared app can view and edit its data. Canvas exports to Docs, Slides or PDF, with no HTML file download listed.

Which way should you use?

Choose your method based on whether your viewer has the same AI account you do and whether the page can live at a public web address.

Ways to share an HTML file compared (checked October 16, 2026)
Way to share Opens as a page? Who can open it Catch
Email attachment After saving and opening in a browser Email recipients Gmail blocks .js files; M365 admins can block .html
Google Drive No, treated as a Markup/Code file Restricted or Anyone with the link Ended web hosting on August 31, 2016
Teams or SharePoint No, downloads or shows raw content Team channel members SharePoint downloads HTML with scripts; cannot switch off
Netlify Drop Yes Anyone with the public link Removed after about an hour unless claimed with an account
Vercel Drop Yes Anyone with the link Free Hobby plan is for personal, non-commercial use only
GitHub Pages Yes Anyone on the internet (on GitHub Free) Public repo on Free; not allowed to run an online business
Claude artifact link Yes Invited users, your org, or Anyone with the link Viewers need a Claude account; no link sharing on Free
ChatGPT Sites Yes Public (no sign-in) or invited ChatGPT accounts Needs Plus, Pro, Business or Enterprise; not on Free or Go
Gemini Canvas link Yes, on gemini.google.com Anyone with the public link (if admin allows) Does not open in mobile app; visitors can edit shared app data
SecondPage Yes Restricted, Your organization, or Anyone with the link Starter plan is free with 30-day page availability

How do you share it privately and get feedback?

If all you need is a quick public link, Netlify Drop is free and quick, and if everyone already uses Claude or ChatGPT on the same plan, the built-in sharing may be enough. When you want to share an HTML file or folder privately and collect feedback, upload it to SecondPage or ask a connected AI like Claude, ChatGPT or Gemini to publish it. (Disclosure: SecondPage is our product, and you are reading a SecondPage page.) A page set to Anyone with the link opens in any browser with no account, or you can keep it Restricted to people you invite by email, who can comment or suggest edits on the page (the Starter plan is free with 30-day page availability).

Before you send the link

Run through these four checks before you send your file or link to a colleague or client. Open your link in a private browser window to see what your client will see.

Questions people ask

Can you send HTML files by email?

Yes, neither Gmail nor Outlook blocks .html or .htm attachments on its built-in list. However, Gmail blocks separate .js script files even inside a .zip, and a company's Microsoft 365 admin can set the attachment filter to reject HTML files at work. To view the page, the recipient has to save the attachment and open it in a web browser.

How do I send an HTML file as a link?

Drag and drop your index.html file or folder onto a free host like Netlify Drop (app.netlify.com/drop) or Vercel Drop (vercel.com/drop) to put it online at a web address. If your AI built the page inside Claude, ChatGPT or Gemini, you can also share it through a Claude artifact link, ChatGPT Sites or a Gemini Canvas link when your plan allows.

Can other people open an HTML file?

Yes, anyone with a web browser can open an HTML file. If you send the file itself, the other person has to save it and open it with their browser, and any separate images, styles or scripts must stay in the same folder layout. Putting the file online at a link lets anyone with access open it directly in their browser.

Why does Google Drive show my HTML file as code?

Google Drive lists .HTML as a "Markup/Code" preview type alongside source-code files, so it treats the file as code rather than opening it as a page. Google deprecated web hosting in Google Drive on August 31, 2015, and stopped serving pages from Drive addresses on August 31, 2016.

How do I open an HTML file on an iPhone?

In iPhone Mail, touch and hold the attachment to save it to Files or open it in another app. Because Apple's guide for the iPhone Files app names only images and PDFs as Quick Look preview types, touch and hold the saved file in Files and choose Open With to pick an app. If the HTML file is shared as a hosted link instead, it opens in the iPhone's browser like any web page.

Share your next HTML page without the workarounds

Upload an HTML file or publish straight from your AI to get a link your team or clients can open and comment on in their browser.

Try it: select any sentence on this page to start a comment.

Keep reading

All articles
  1. How to save a ChatGPT conversation as a PDF
  2. How to fact-check AI before you share it
  3. Can people see your ChatGPT chats? Who can read them