Serve a local folder of files in your browser for easy testing without having to run a server.
Files in folder '' are now hosted at:
The link only works locally as long as this page is left open.
What is this?
Why is it useful?
How does it work?
Click the big button at the top and choose a folder. Once chosen and any permission prompt approved, a link will appear. Click the link and it will open a new tab and load index.html if a file with that name exists, otherwise it will show the contents of the folder for browsing. This is particularly useful with HTML files, which are also able to load all sub-resources like they can on a normal web server, but this does not actually involve a HTTP server (it works using Service Workers). Note the provided link will only work so long as this page remains open — as soon as you close the page the link will stop working.
You can also open this tab multiple times and host different folders simultaneously. Additional tabs will host at a different URL for accessing different folders. This page also works offline and is installable in supported browsers.
A couple of known limitations are:
- The files are served from a subfolder. Serving from the origin root is not supported as it complicates loading this page and supporting multiple hosts.
- The hosted files cannot register their own service worker. This is because the browser enforces that the SW script is loaded from the network, where it will return 404.
However since the vast majority of web APIs will work, this should support most client-side web content, such as HTML5 games, static websites, and so on.
Is my data kept private?
Who made this?
v1.2 — last updated December 22nd 2021 — View code on GitHub