How to Share an HTML File as a Link
Send an HTML file as a link so the other person sees a page, not code. This guide covers what the file must contain, what happens when you upload it, and when a different tool is the better choice.
By the CompressItAll team. Published 2026-10-25. Updated 2026-10-25.
To share an HTML file as a link, you put the file on the web and send the address. A file on your own computer has no address that anyone else can reach, and an attachment makes the reader download it and open it themselves. A link lets them click and read. Our Share HTML tool does this for one file: you choose the file, pick how long it stays online, and get a link to send. You do not need an account.
What you need before you upload
You need one file that ends in .html or .htm, no larger than 1 MB. The file also has to be self-contained. The next section explains what that means.
What a self-contained file is
A self-contained HTML file carries everything the page needs inside itself. The styles sit in a style block in the file. Any script sits in a script block. Small images are written into the file as data addresses, which are long strings that start with data:. The page does not ask for anything from another web address.
This matters because the viewer runs your page in a sandbox that blocks requests to other web addresses. We tested it on 25 October 2026 with two files. The first was self-contained, with a style block, an image embedded as a data address and an inline script. It looked and behaved the way it does on a computer: the colors applied, the image showed and the script ran. The second linked to a stylesheet and a script on a public code host and to an image on a public image host. The heading showed, but the stylesheet, the script and the image were all blocked. The page appeared in the browser's default look, with no styling and no image, and code that checked for the script found nothing.
If your file loads things from other sites, the fix is to bring them inside. Copy the stylesheet into a style block. Copy the script into a script block. Turn small images into data addresses, or draw them as inline SVG. A page that loads its fonts from another site will fall back to the reader's default fonts, because the viewer only allows fonts that are embedded in the file. We did not test an outside font, so treat that last point as what the viewer's rules say and not as something we watched happen.
How to share the file, step by step
- Open the Share HTML page and choose your file, or drop it on the box.
- Check the link name. It is filled in from the file name and can contain only letters, numbers and hyphens. It becomes part of the link, so do not put anything private in it.
- Pick how long the page should stay online: 1 hour, 24 hours or 7 days. The choice that is selected at first is 24 hours.
- Tick the box that says you have the right to share the file and that it follows the acceptable use rules.
- Press Upload and get link.
You then see two links. The view link is the one you send. The delete link removes the page before it expires. The page tells you to save the delete link now, because we cannot show it again and cannot recover it. Copy both before you close the tab.
What the reader sees
The reader opens the view link and sees your page inside our viewer. Above it is a banner that says the page was uploaded by a user and has not been reviewed by CompressItAll, and warns the reader not to enter passwords or payment details. The banner has a Report link. The banner belongs to the viewer, so you cannot remove it, and it does not cover your page.
Limits and when not to use this
- Anyone with the link can read the page. There is no password and no sign-in. Whoever you send the link to can forward it.
- Pages are short-lived. The longest you can keep a page online is 7 days. Then it is deleted.
- One file, up to 1 MB. A larger page has to be made smaller before you can share it.
- We do not review pages before they go online. Do not upload anything private or confidential, and do not upload anything you have no right to share.
- It is not a website host. There is no custom address, no folder of files and no way to update a page in place.
If you need a page to stay up for months, to sit at your own address, or to be visible only to certain people, use a web host that offers those things. This tool is for the case where you want someone to look at a page this week and then have it gone.
What we do with your file
We upload your file to our servers over HTTPS and store it there so the link works. We delete it when it expires or when someone uses the delete link. Uploaded pages and the viewer are marked so that search engines are asked not to list them. The privacy policy covers this in full, and the acceptable use rules list what you may not share.
Related guides
If your HTML came out of an AI chat, read how to share AI-generated HTML as a link. If you have a Markdown file and not an HTML file, read how to share a Markdown file as a web page.
Frequently asked questions
Can I just email the HTML file?
You can, but then the recipient has to save the file and open it in a browser themselves. A link opens as a page when they click it.
Does the person opening the link need an account?
No. Neither you nor the reader signs up or signs in.
What if my page uses a stylesheet or script from another site?
It opens without them. In our test a stylesheet, a script and an image loaded from other sites were all blocked. Copy the style and script into the file and embed small images as data addresses.
Can I change the page after I upload it?
Not in place. Delete the page with your delete link, fix the file, and upload it again. You get a new link, so send the new one.
What if I lose the delete link?
We cannot show it again or recover it. The page is still deleted automatically when it expires, which is at most 7 days after you upload it.