Guide
Preview an HTML file
Sign in, drop your HTML file on the home page, and a few seconds later it renders at its own link, ready to open on any device or send to anyone. This page exists for "preview html file online", "in cursor", "in vscode" and "on iphone": the answer to all four is the same.
Preview without uploading
Save the code as page.html and open it: every browser renders local HTML files, scripts run, and inline CSS applies. Relative images only work if they sit next to the file. In VS Code or Cursor, right-click the file and open it in the browser, or use a live-preview extension. What a local preview cannot do is reach a phone or another person; that is what the link is for.
Preview on a phone
Phones do not open .html attachments reliably: iPhone Quick Look sometimes shows the code, and Android depends on the file manager. Upload the file, open the link on the phone, and it renders in the browser like any web page. More in how to open an HTML file on a phone.
What the link is
An unlisted page at an address like https://k3p9x2a.shrz.in, up to 5 MB per file on the free plan, kept until you delete it, with no ads and no tracking. Free pages carry a small "Hosted on ShareHTML" bar. Search engines are asked not to index the page. Every upload is checked before it goes live, which takes a few seconds for most files. Delete or replace the page any time from your dashboard.