stacktr.ee
Free. Nothing is uploaded.

HTML viewer

Paste HTML or open an .html file and see it as a working page, with its styles and scripts running. The viewer works in your browser, so the file is not uploaded and there is no account. Check it at desktop, tablet or phone width, then get a private link if you want to send it to someone.

or

It runs in your browser. Nothing is uploaded.

Your page shows here

Paste HTML above or open a file.

Send this page to someone

Get a private link they can open on any device. No account, a passcode by default, and it lasts 24 hours unless you keep it.

How to view an HTML file online

  1. Give it the page. Paste the HTML into the box, or press Open a file and choose an .html file. You can also drag the file onto the box.
  2. Look at it. The page is drawn underneath, with its CSS applied and its JavaScript running. Edits you make in the box show after a moment.
  3. Check the width. Desktop, Tablet and Phone draw the page at 1280 pixels or wider, at 768 and at 390, and scale it to fit. Expand gives it the whole window.
  4. Send it, if you want to. Get a private link turns the page into a link another person can open. This is the only step that uploads anything.

What runs in the viewer, and what does not

In the page In the viewer
CSS and JavaScript written into the file Runs
Scripts, fonts and images loaded from a web address Load, as they would if you opened the file from your disk
Buttons, tabs, charts and forms Work
A stylesheet, script or image in a separate file beside the HTML Missing. Only the one file is read.
Cookies and browser storage Not available. A page that saves to storage may show an error.
Sending the whole tab to another address Blocked

The last two rows are the sandbox at work. The page is drawn in a frame that has no access to this site, to its cookies or to anything else open in your browser, which is what makes it reasonable to open a file you did not write.

Is it private?

Yes. Your browser reads the file and draws it on this page. The HTML is not sent to Stacktree, it is not stored, and it does not go into the address bar, so there is no link to this page that carries it. Close or reload the tab and it is gone.

One thing to know: the page you open can still fetch what it references from the web, such as a font or a chart library, exactly as it would if you opened it from your disk.

Sending the page to someone

An HTML file is awkward to send. As an email attachment it arrives as a download, and mail filters distrust it. Get a private link uploads the page to Stacktree and gives you an unguessable link, with a passcode unless you turn it off. The other person opens it in any browser, on a phone or a computer, with no account.

The link lasts 24 hours. Keep it in a free account and it stays at the same address for 7 more days, using one of the account's 3 pages. See how to share an HTML file as a link for passcodes, expiry and what a client sees.

A published page runs under a stricter policy than this preview. Fonts and common library CDNs load, scripts and images from other sites do not, and the page cannot call other servers. The result lists anything on your page that will not load for visitors.

A folder or a zipped site

The viewer opens one .html file. If the page depends on files beside it, such as style.css or an images folder, zip the folder that holds index.html and publish the zip: the files travel together to one link.

On an iPhone

The viewer is a web page, so there is nothing to install on a phone. Save the file to the Files app, tap Open a file and choose it. How to open an HTML file on iPhone has the steps.

FAQ

Frequent questions

What is an HTML viewer? +
An HTML viewer takes HTML code or an .html file and shows the page it describes, the way a browser would, instead of the raw tags. This one works in your browser: paste the code or open the file and the page appears underneath, with its CSS applied and its JavaScript running.
How do I open an HTML file online? +
Press Open a file on this page and choose the .html file, or drag it onto the box. The page is drawn under the box straight away. You can also copy the HTML and paste it in. Nothing is installed and nothing is uploaded.
Is my HTML uploaded anywhere? +
No. The viewer reads the file with your browser and draws it in a frame on this page. It is not sent to Stacktree or to anyone else, it is not saved, and it is gone when you close or reload the tab. The one exception is the optional last step, Get a private link, which uploads the page so that someone else can open it.
Does JavaScript run in the viewer? +
Yes. Scripts in the page run, including libraries it loads from the web, so charts, tabs and buttons work. They run in a sandbox: the page cannot read this site, has no cookies and no browser storage, and cannot send the tab somewhere else. A page that saves to browser storage may show an error or forget what you entered.
Why are my images or styles missing? +
Because they are separate files. The viewer reads the one .html file you chose, so a stylesheet or an image that sits beside it on your disk never reaches the browser. Images and styles written into the file, or loaded from a web address, do show. To see a whole folder as a site, zip it and publish the zip.
Is it safe to open an HTML file someone sent me? +
It is safer here than double-clicking the file, because the sandbox stops the page from reading this site or redirecting your tab. It is not a virus scan. The page can still show a form and send what you type to whoever wrote it, so do not enter a password or card number into a file from a sender you do not know.
Can I view an HTML file on a phone? +
Yes. The viewer is a web page, so it opens in the phone's browser with nothing to install. Tap Open a file, choose the file, and tap Expand to give the page the whole screen. On an iPhone, save the file to Files first.
How do I send the page to someone after viewing it? +
Press Get a private link under the preview. The page is uploaded and you get an unguessable link with a passcode, which the other person opens in any browser with no account. The link lasts 24 hours unless you keep it, and keeping it in a free account costs nothing.
Is the HTML viewer free? +
Yes. Viewing has no account, no limit and no cost. A private link is free too: without an account it lasts 24 hours, a page can be up to 10 MB, and one network can publish 20 pages a day.
Keep reading

Related

References

Sources and further reading