All posts

How to Share an HTML File on WhatsApp So It Opens as a Website

Don't send the .html file. Publish it and send the link. An HTML attachment on WhatsApp often opens as a wall of code, or the phone says it can't open the file at all. A link opens the page in the browser on any phone, shows a preview card in the chat, and keeps working after you change the page.

Why the .html attachment doesn't work

WhatsApp sends an HTML file as a document, the same way it sends a PDF. The person on the other end gets a file to download, and their phone has to decide what to do with it. Depending on the phone and the apps installed, one of these happens:

Messenger, Telegram and email behave much the same way, and a plain SMS can't carry a file at all. Pages made in ChatGPT, Claude or Gemini add one more problem. They keep CSS and JavaScript inside the file, which looks fine when you double-click it on your computer, but a phone's file preview often skips the scripts. If your page uses separate image files, sending only index.html means the pictures are missing.

The fix: put the page online and send a link

A link is just text. It works in every messenger, in an SMS and in an email, and the person taps it like any other website. They don't need to download anything or know what HTML is. You also keep control: change the page later and the same link shows the new version.

With Hostilo it takes about two minutes, and the free plan doesn't ask for a card.

Step by step with Hostilo

1

Create a free account

Sign up at hostilo.app/register with Google or your email. No credit card.

2

Click “Start the wizard” on the Projects tab

The wizard sits at the top of the Projects tab.

3

Paste the code

Open your .html file in Notepad or TextEdit, select everything and copy it. If the page came from an AI chat, you can paste the whole answer: the wizard cuts out the code from <!DOCTYPE html> to </html> by itself.

4

Pick an address

Type a short name, for example anna-birthday. The wizard checks right away whether it's free.

5

Click “Publish the site”

The page works at once at anna-birthday.hostilo.page, with HTTPS. Click “Copy link” and paste it into WhatsApp.

More than one file?

If your site has images, a separate CSS file or several pages, put the whole folder into a ZIP. Then in the site editor use “Project from a ZIP file”. index.html becomes the main page, the other files keep their folders, and paths are fixed automatically. The ZIP can be up to 20 MB.

What the link looks like in WhatsApp

When you paste a link, WhatsApp builds a preview card from the page. The title comes from the <title> tag in your HTML, so put something people will recognise there, like “Anna's 30th, 6 December” rather than “Document”. Hostilo creates a preview image for every page automatically, so the card doesn't come out blank.

Got the page from AI? Before publishing, ask it to “set a clear title and a one-sentence meta description”. It takes ten seconds and the card in the chat looks much better.

Change the page, keep the link

Spotted a typo after sending? Fix it in the Hostilo editor, or paste a new version from your AI chat, and save. The address doesn't change, so everyone who taps the old message sees the corrected page. If a change goes wrong, version history lets you go back to an earlier copy.

A QR code for print

The same link works on paper. Paste it into any QR code generator and print the code on an invitation, a menu or a poster. When you update the page, the printed code still leads to it, so you don't have to print again.

Who can see the page

Treat a published page as public. Anyone who has the link can open it, and links get forwarded. Don't put phone numbers, addresses or anything private on a page you wouldn't want strangers to read. If a page is only for a few people, PRO (29 USD a year, excluding VAT) lets you set a password on it. PRO also adds your own domains, such as yourname.com.

Frequently asked questions

Can I send an HTML file on WhatsApp at all?

Yes, as a document. But the other person gets a file, not a page, and whether it opens depends on their phone and apps. A link to the published page opens in the browser every time.

Does the link work in Telegram, Messenger, SMS and email too?

Yes. A link is plain text, so you can paste it anywhere: a chat, a text message, an email, a social media bio or a QR code.

Is it free?

Yes. The free plan needs no card and gives you a site at name.hostilo.page with HTTPS. PRO costs 29 USD a year, excluding VAT, and adds your own domains and a password per page.

What if I change the page after sending the link?

Update it in Hostilo and the link stays the same. People who open it again see the new version, and you don't have to send anything twice.

Turn your HTML file into a link

Paste the code, pick an address and send the link on WhatsApp in about two minutes. Free to start, no credit card.

Publish your page free

Related guides

More from the blog