To preview HTML, you can paste the code into an online HTML viewer, or save it as a .html file and open it in your browser. Both show the page exactly as a visitor would see it, and neither needs any software beyond a browser.
Here are four simple ways, what each is best for, and how to share the page once it looks right.
1. Paste it into an online HTML viewer
This is the quickest way if you have code but no file yet.
- Open the HTML viewer.
- Paste your HTML into the box.
- The page appears next to the code, and updates as you type.
It is useful for checking AI-generated pages, trying small changes and seeing mistakes straight away. The tool runs in your browser, so nothing is uploaded when you only preview.
2. Save a file and open it in your browser
If you have a text editor, you can preview without any website.
- Paste the code into a text editor, such as Notepad on Windows or TextEdit on Mac (set to plain text).
- Save it with a name ending in
.html, such aspage.html. - Double-click the file, or drag it into a browser window.
The page opens from your own computer. Remember that a page on your computer cannot be seen by anyone else until you put it online.
3. Use a code editor with a preview
Code editors such as VS Code have extensions that show a live preview as you type. They are great for bigger projects, with several files, but they need installing and a little setup.
If you want to share a page you built in an editor, see how to share an HTML file from VS Code.
4. Use your browser's developer tools
For small changes to an existing page, your browser's developer tools let you edit HTML and CSS and see the result instantly. Changes are temporary and disappear when you reload, so use this for experiments, not for saving work.
Check your page before you share it
A page can look fine on your computer and fail somewhere else. Before you share:
- Open it on a phone. Most people will. Check that text is readable and nothing is cut off.
- Look for missing images. Images that point to files on your computer will not load for others.
- Check that styles are inside the file. If the CSS or JavaScript is in separate files, merge them into one file or the page will look plain.
- Test any buttons or forms. Make sure they do what you expect.
- Remove placeholder text. Search for "lorem ipsum" or sample names.
Share the preview as a link
When the page looks right, you can put it online as a link.
- Open DropMyPage and choose Paste HTML or Upload file.
- Tap Create link.
- Send the link or the QR code to whoever needs to see it.
On the free plan you need no account. Files can be up to 5 MB and the link lasts 7 days. That is usually enough to ask someone for feedback. For a link that stays up, with a password or a name you choose, there are paid plans (Monthly $9.99, Yearly $47.99, or Lifetime $59). Prices and features can change, so check the pricing section.
Preview vs publish
| Preview | Publish | |
|---|---|---|
| Who can see it | Only you | Anyone with the link |
| Good for | Checking and editing | Sharing and feedback |
| Needs | A browser | A link or a hosting service |
If you need a full website with many pages, a custom domain and permanent hosting, a static hosting service is a better fit. See how to host an HTML page without GitHub.
Common problems
- The page is blank. There may be a typo in the code, or the file was saved with the wrong extension. Make sure it ends with
.html, not.txt. - It shows the code instead of the page. The file is being opened as text. Open it in a browser.
- Styles are missing. The CSS file is separate. Put the CSS inside a
<style>tag. - Images are broken. The image paths point to your computer. Use full
https://links or inline images.
FAQ
Is the online HTML viewer free?
Yes. It runs in your browser, with no account.
Can I preview HTML on my phone?
Yes. Open the viewer in your phone's browser and paste the code. Previewing also helps you see how the page looks on a small screen.
Does it work with CSS and JavaScript?
Yes, if they are inside the HTML code.
How do I let someone else see my page?
Put it online as a link. See the steps above.