Too Average Tools, by Jaycee Day

Ship It

How to password protect an HTML page

Use your host's password setting, or encrypt the file. A password prompt written in JavaScript doesn't protect the page, because the page is still in the source.

Password screen on a shared page, with a Password field and an Unlock button

What works

WayWhat you doGood to know
Host password settingTurn it on in Netlify or VercelOnly on some plans
Encrypt the fileRun StatiCrypt, upload the resultWorks on any host with HTTPS
Login gatePut Cloudflare Access in frontPeople log in, with no shared password
Ship ItSay "ship it" in Claude, then add a passwordYou type the password in your browser, not the chat

Encrypt one file with StatiCrypt

  1. Run this in the folder with your page, and type a long password when it asks:npx staticrypt page.html
  2. Upload the new file from the encrypted folder.
  3. Send the link, and send the password in a separate message.

Anyone can download the encrypted file and keep guessing, so use a long, unusual password.

What doesn't work

A prompt() check in JavaScript runs after the browser already has your page. Anyone can open the source and read it.

Questions

Can I password protect HTML without a server?
Yes. StatiCrypt encrypts the page into one file with its own password prompt, which decrypts it in the browser.
Does it protect the images and other files too?
StatiCrypt encrypts the HTML file you give it, so files it links to stay public. A host password setting covers the whole site.

By Jaycee Day. Checked November 2026 against StatiCrypt, Netlify, Vercel and Cloudflare docs. Plans change, so check before you rely on one.