Want a link to it? Publish it free to its own https address. No account needed.
What is an HTML viewer?
An HTML viewer shows what HTML code looks like as a web page. Paste the code and it renders it the way a browser would, including the styles and any JavaScript, so you can check a page without saving a file or uploading it anywhere.
It's useful for checking code an AI wrote for you, testing an email template, previewing a snippet from a tutorial, or seeing whether a layout holds up on a phone before you publish it.
How do I preview HTML code online?
- Copy your code
From a file, an AI chat or a tutorial. A whole page or just a fragment both work.
- Paste it in the box above
The preview updates as you type. Use Run to start any scripts again from the beginning.
- Check it at phone width
Switch the preview to phone to see the page at 390 pixels wide, the way most visitors will see it.
- Publish it, if you want a link
Publish opens it in the builder, ready to name and put live. It's free and doesn't need an account.
Frequently asked questions
How do I view an HTML file online?
Open the .html file in any text editor, copy everything, and paste it into the box above. It runs straight away in the preview next to it. Separate CSS and JavaScript can go in the same box inside <style> and <script> tags.
Is my code sent anywhere?
No. The preview runs entirely in your browser and nothing you paste is uploaded. The code is only sent to a server if you press Publish, and then only to publish it.
Does JavaScript run in the preview?
Yes. Scripts run in a sandboxed frame, as they would on a real page, including libraries loaded from a CDN. The sandbox stops the code reaching this page, its cookies or its storage.
Can I see how it looks on a phone?
Yes. Switch the preview to phone width with the button above it. It shows the page at 390 pixels wide, the width of a typical modern phone, so you can check your layout responds.
How do I get a shareable link to my HTML?
Press Publish. Your code opens in the siteseconds.com builder, where you name it and put it live at its own https address, free and without an account. Claim it with a free account to keep it permanently.