HTML to Website: How to Put an HTML File Online
StaticFast Team
You have an index.html on your computer. It opens when you double-click it, but the address bar starts with file:// and nobody else can see it. You want a link you can send today, and you have no server, no Git and no domain.

Getting from HTML to a website takes one upload. This guide walks through it in five steps and spends most of its time on the two things that break a first upload: where index.html sits and how the page points at its own files. If you want the background first, read our guide to static website hosting.

What "HTML to Website" Actually Needs
There is nothing to convert. A website is your files on a host that serves them at a URL. The HTML you already have is the website. It is only missing the host.
A host is a computer that is always online and answers when a browser asks for your address. It sends back the same files you see on your disk, which is exactly what a static website is. So the work is to pack the files the right way and hand them over.
Step 1: Check What You Have
Open the folder where the HTML file lives and look at what sits next to it. Then open the file in a text editor and search for href= and src=.
If every style and script is written inside the file, between <style> and <script> tags, you have a single self-contained file. Pages made by an AI assistant usually look like this. If the file points at style.css, script.js or an images folder, you have a folder of files, and all of them have to go online together.
| One HTML file | Folder of files | Git repository | |
|---|---|---|---|
| What you upload | The file or its code | A ZIP of the folder | Commits you push |
| Suits | An AI-made page | A builder export | A site you edit weekly |
| To update | Upload it again | Upload the ZIP again | Push a commit |

What you have decides what you upload. With one file, skip to step 4. With a folder, steps 2 and 3 decide whether the upload works.
Step 2: Put index.html at the Top
When someone opens your address without a file name, the host looks for a file called index.html and serves it. If your home page has another name, such as home.html or resume.html, rename it to index.html.
The file also has to sit at the top level of what you upload. This layout works:
index.html
style.css
script.js
images/photo.jpg
This block shows the files as the host should see them, with index.html beside the other files and not inside another folder.
The usual mistake happens when you make the ZIP. If you right-click the folder itself and compress it, the ZIP contains my-site/index.html, one level too deep, and the host finds no home page. Open the folder, select everything inside it and compress the selection instead. On Windows, right-click the selection and choose Send to, then Compressed (zipped) folder (on Windows 11 it sits under Show more options). On a Mac, Control-click the selection and choose Compress.
Step 3: Fix the Paths
A page finds its stylesheet, scripts and images through paths. A path that works on your computer can fail on a host for three reasons.
- Absolute paths: A path like
C:\Users\you\site\style.cssorfile:///Users/you/site/style.csspoints at your own disk. No visitor has that disk. - Leading slashes:
/style.cssmeans "start at the top of the site". It works when the site sits at the top of its address, and breaks when a host puts the site in a subfolder. - Letter case: Windows and macOS treat
Photo.JPGandphoto.jpgas the same file. Most hosts do not, so the image loads on your computer and is missing online.
Relative paths avoid all three problems. They start from the folder the HTML file is in:
<link rel="stylesheet" href="style.css">
<img src="images/photo.jpg" alt="Team photo">
<script src="script.js"></script>
These three lines load a stylesheet, an image and a script that sit next to index.html, wherever the folder ends up.
Check the file names too. Keep them lowercase and replace spaces with hyphens, then make the paths in the HTML match them letter for letter.
Step 4: Upload the File or the ZIP
Pick a host that takes what you have. Upload hosts come in two kinds. Some accept one HTML file, or let you paste the code. Others accept a ZIP or a whole folder. The upload box says which, so read it before you drag anything in.
Drop the file or the ZIP into the box, wait for the upload to finish and copy the address the host gives you. That address is the website. A free link is usually a subdomain of the host with a name it picks for you.
Do not upload a page that needs a database, PHP or a private API key in the code. A static host only sends files. It does not run server code, and a key inside the HTML is readable by every visitor.
Step 5: Test the Live Link
Open the link in a private browser window, so nothing is loaded from your own disk or cache. Then check four things.
- HTTPS: The address should start with
https://. Browsers warn visitors about pages without it. - Phone: Open the link on a phone. If the page looks tiny, the HTML is missing the viewport tag shown below.
- Missing files: A page with no styling or with empty image boxes has a broken path. Press
F12, open theConsoletab and look for lines containing404. Each one names a file the host could not find. - Links: Click every link between your own pages. A link to
about.htmlonly works if that file was in the upload.
<meta name="viewport" content="width=device-width, initial-scale=1">
This tag goes inside <head> and tells phones to show the page at the width of the screen.
Update the Site and Keep the Link
The first upload is rarely the last. You fix a typo, change a price or swap a photo, and the link is already in an email or on a printed QR code.
Before you share the link widely, find out how the host handles a second upload. Some replace the files behind the same address. Others create a new address every time, and the old one keeps showing the old page. If the link is going on paper, choose a host that keeps the address when you upload again.
The Git Route: GitHub Pages
GitHub Pages serves a site straight from a Git repository. You create a public repository, add your files with index.html at the top, then open Settings, then Pages, and choose the branch to publish from. The site appears at an address made of your username and the repository name.
It is worth it when you change the site often, work with other people or already use Git, because every change is a commit you can undo. It is a lot to learn for one page you want live today. Our GitHub Pages alternative page lists what GitHub Pages asks of a beginner.
Introducing StaticFast
For the single-file case, we built a free tool that hosts an HTML page made by Claude or by any other AI assistant.
Choose Paste HTML and paste the code, or choose Upload .html file and drop the file, then click Publish page. You get a live URL with HTTPS and a QR code. A page can be up to 5 MB.
You can try it without an account, but a trial page is deleted after 5 minutes. That is long enough to test the page on your phone, and not a link to share. On a plan the page is permanent. Solo is $9 a month and Growth is $19 a month. When the page changes, open Hosted Pages in your dashboard and choose Update HTML. The URL and the QR code stay the same.
The limit is the one from step 1. StaticFast hosts one HTML file with its CSS and JavaScript written inside it. It does not take a ZIP or a folder of files, so a multi-file site needs a host that accepts a ZIP, or GitHub Pages.
Questions About Putting HTML Online
Q: How do I turn an HTML into a website?
A: Upload it to a host. Name the home page index.html, keep it at the top level together with its CSS, JavaScript and images, and upload the file or a ZIP of the folder. The host gives you a URL, and that URL is the website.
Q: How can I convert HTML to a URL?
A: Nothing is converted. A URL is the address where a host serves your file. Paste the HTML or upload the file to a host that accepts a single page, and it returns the link.
Q: Is HTML still used in 2026?
A: Yes. Every web page a browser shows is HTML, whether a person wrote it, a website builder exported it or an AI assistant generated it.
Q: Why are my images missing after the upload?
A: The path is wrong or the file was not uploaded. Look for an absolute path, a different letter case in the file name, or an image folder that was left out of the ZIP.
Conclusion
Now your HTML file is a website with a link you can send. Keep index.html at the top and the paths relative, and the next upload will work the first time.
