zubrag.com
Free php and cpanel scripts to automate your daily routine

Online Tools :: Password Protect / Encode HTML

HTML Password Protector will protect whole HTML page or only part of it using password.

A lot of HTML protectors available. They can be divided into two main categories:
  • obfuscators, which simply use JavaScript escape/encodeURI functions to obfuscate HTML. Such HTML can be easily decoded using unescape/decodeURI functions
  • login box adder, which adds JavaScript login prompt and do not encode HTML. HTML can be easily seen by disabling JavaScript in browser settings
  • combination of above.

This tool is much more secure. It will encode HTML using your password, and will add password box. Incorrect password will result in incorrectly decoded HTML.

Requirements: JavaScript 1.2 (tested on Firefox 2.0, Firefox 3.5, IE 6.0, IE 8, Opera 7.51, Opera 9, Google Chrome. May also work on other browsers/versions). IE8 has a restriction, users will see yellow strip at the top of the page. Will have to click yellow strip and select Allow Blocked Content.

Note: it cannot encode short text due to the nature of encoding. Longer passwords result in better encoding.

Password: (browser will request this password when somebody opens protected page)
Paste your HTML (which needs to be protected) into this box


It will generate password protected HTML code in the box below
This is your protected page text. Save this text as HTML file. Now, browser will pop up password entry form when somebody tries to open your protected HTML page

Note: we will not be able to recover your password, so please do not contact us about this.


You might be interested in other online tools.

Comments

Encoder
November 26, 2007
Fantastic! I own a website, where few pages have links which I wanted to password protect. So I password protected only those links (replaced links on my page with what your tool produced) and now only users who enter correct password can see them!!! Thank a lot!
Hopeless at HTML
December 3, 2007
I pasted this code at blogger and there will be this "Scripted Window" thingy appearing. I enabled the scripting section already, now, the window doesnt pops out but the password is not there.... Can you help me?
shanemurray [anti-spam] hotmail.co.uk
December 16, 2007
Hi, how do you set multiple passwords?
Thanks shanesentertainment.co.uk
newlife [anti-spam] nlcadopt.org
January 8, 2008
Hi, I added the password HTML code and it worked. So, I tried again, but this time did not enter password, but clicked CANCEL instead, and it brought up my page without the password. Is there something I can do to avoid this or redirect them to a page that says "PLEASE CALL NEW LIFE CHRISTIAN ADOPTIONS or VISIT www.nlcadopt.org FOR CONTACT INFORMATION" if they happen to hit cancel because they don't know the password? I need to keep this site and several others only for our clients who have qualified. Thanks for your time and all your help!
pastfinder1 [anti-spam] yahoo.com
January 11, 2008
I need to protect my download pages. They are html pages (not php) What I really would find useful would be a download link and or password that would expire after say 2 or 3 attempts per computer/customer. Thanks for the script on these pages.
stu
February 8, 2008
this script does not work!! you could make something that produces a better result with very little knowledge of javascript! u could try
function password() {
p=prompt("Enter Password","");
if(p=="your password here") {
document.write("your page here");
}
else {
document.write("Error message here");
}
February 8, 2008
stu, your code does not protect page. It just adds login page. "View source" will reveal page contents.
This tool would encode page contents, unless you provide very short text (about 100 characters) or very short password (like 1 to 3 chars only). The note at the top states it clearly. Try pasting your function into text box and enter some 4-5 chars password, like abc12. Can you decipher your function from result?
Rjtmr [anti-spam] aol.col
February 25, 2008
I am working with a host company that provides password protection. Right now when I password protect, my images are the only thing that are protected. Upon entering the correct user/password only the directory of images is available. I don't understand why the actual "html" page doesn't show. What script do I need to put into those "html" pages in order for complete protection to occur? Please help, I'm about to pull what hair I have left out!!!
February 26, 2008
Dominic
I'm trying to get this script [the java/html one] to be validated at W3C site with no luck. Do you know if it can validate? [As it cold well be me doing something wrong] Thanks.
March 5, 2008
how do you get his to work on free webs please someone?
cherian03 [anti-spam] hotmail.com
April 22, 2008
While changing my freewebs passoword I left the new password box empty and pressed enter. Now I've a "null" password but can't open my site? Any help available?
ayula700 [anti-spam] yahoo.com
April 30, 2008
This is very good. so i get to protect my page from unauthorized people
May 4, 2008
Hi, I added the password HTML code and it worked. So, I tried again, but this time did not enter password, but clicked CANCEL instead, and it brought up my page without the password.

Me too
May 28, 2008
Does not work! Even if you click cancel it will still take you to the page!!!!
Garrett
June 13, 2008
It's not password protected if "cancel" does the same thing as putting in the correct password
twitter
June 13, 2008
Works just great! Thank you Zubrag!

I tried to encode short text (like 100 characters) and it did not encode it good enough. But guys, read the description carefully. It cannot encode short text. I tried to encode text about 500 characters long with a password 5 characters long and it made my text unreadable.

Also tried "cancel" button. Yes, it would take you to the protected page, but the page text *is still encrypted*, so i would not worry about that.
michael [anti-spam] 1worldphotos.com
July 17, 2008
Work's really well with Firefox, Safari and other browsers, does NOT work with MS I.E., which says "Click here to allow Script" but when you do you get no password (tried un-setting all the settings in I.E. but to no use), Shame as 99% of my customers use I.E. and it's easy to use and just prefect (when not using I.E.), :-(
greg
August 22, 2008
code doesn't work and you failed to specify exactly where in the html document to post it.
westie rehoming
August 27, 2008
oh dear - in IE6, it just freezes the browser, right or wrong password. I won't be using this for our organisation.
August 27, 2008
added code.. i tohught it worked great, but he 2nd time I accessed page it asked for passwork but accepted any characters including nothing to get me to my page.
Blueroc
September 10, 2008
Hmm...I don't understand what you guys are complaining about. I tried it on both IE and Firefox, and none of those things you say are wrong with it are true. I clicked cancel, and got a blank page. I didn't type anything and clicked OK, and got the same blank page. When I typed random stuff, it gave me random stuff back. I right clicked and viewed the source, but it was encrypted so I couldn't view it. I've done it multiple times because someone stated that it only worked once, but still it worked. Was it updated or something? Because I don't see any problems with it...
leigh
September 18, 2008
got it working but on freewebs it lets you on your site whether you push cancel or type in the wrong password
kira2007 [anti-spam] ono.com
October 14, 2008
Este es mi comentario
November 8, 2008
GLITCH awww, it works perfectly..except if you press cancel is bypasses.....
November 12, 2008
but where do you put it in blogger?i put it in template but can't ..so which box do you put it in ?
TALKING TO STU
December 7, 2008
Umm Stu, if you were to do that, and you know the pages name, you would just type that name.

EX: the page's name is abcd.html

and you don't have the password,(since the page that you have to enter the password isn't called abcd.html) you just put abcd.html into the browser and your in...

document.write(<html> etccc...)
:)
starnsun [anti-spam] comcast.net
January 13, 2009
I used this in Vista HP SP2 and it worked on my hard drive. I placed the pages up on the server and it did not work. A yellow msg came up asking if I trusted the script and when I said ok, it went right to the protected page--no password. The host server is Linus. Also, it did not work in FireFox. It allowed me to just say ok without putting in a password at all. Any suggestions?
June 1, 2009
How do u make the password in a star...?
July 19, 2009
LOVEEE THIS! THANKS!
July 26, 2009
Easily Bypassed, Want to know how? simply by disabling javascript.
gkhera99 [anti-spam] gmail.com
August 6, 2009
How we can have multiple passwords for a post. Regards
Indian-share-tips.com
mr.daryn.8 [anti-spam] hotmail.com
October 1, 2009
How would I download or enable JavaScript 1.2?
Ged2009
October 17, 2009
Hi,
Just though I would say thanks for this great tool. Very valuable tool to have in the arsenal when it comes to website design.
Trishul
October 19, 2009
Did'nt work. Press cancel, and it takes u to the page.
HeyYo
October 31, 2009
May I know how this thing work on blogger? Pls help!
*D*
November 8, 2009
Not working for me either. It doesn't even ask for a password in IE, and in Firefox I can click cancel or type whatever I want and it will open the page.
November 12, 2009
This tool would encode page contents, unless you provide very short text (about 100 characters) or very short password (like 1 to 3 chars only). The note at the top states it clearly. Try pasting your function into text box and enter some 4-5 chars password, like abc12. Can you decipher your function from result?

Said result doesn't seem to work in my case, unless I'm doing something wrong. and I have about 300 characters at this point on my page.
January 18, 2010
When I type the password into the field on my protected page, you can see the password in the field. How do you make it gaia le val?
Ray
February 10, 2010
well, it works... except it doesn't password protect the webpage at all. you can enter anything you want and get through. I'd love it if I could find a code like this that works!
guru
February 10, 2010
@Ray - what is your browser? i tried chrome, firefox, IE (except for 8) and it worked like a charm
kdb424
March 11, 2010
Works perfect. Disabling javascript shows a blank page, and entering the wrong password shows wrong things. Thank you VERY much. Brilliant tool.
faisal
March 14, 2010
ersyt
sae
March 14, 2010
want a password protect code of html
Theodore
March 16, 2010
Worked well with Safari and Firefox, but with IE Version 8.0.6001.18702, no luck.
Also, if wrong password is displayed with Firefox or Safari, it displays 'encrypted' page. Is it possible to display an error page?

Thank you.
Theodore
me
March 16, 2010
can someone please give me step by step on how to get this to work.
Gaffney Graphics
March 24, 2010
Guys. You should read. It says text must be encrypted. Search up HTML Encoder iWebtool & you should get it.
jake
March 29, 2010
is there a way to take the encrypted code and the password and get the original html?
Joe
April 8, 2010
Not working with IE, it pop up new bar with :This wedsite is using a scripted window to ask you for information. If you trust this website,click here to allow scripted windows"
But when allow it just come up with blank page. No popup window for asking password.
Kishore
April 24, 2010
Please give me some more information about set password in html topic
rares [anti-spam] azet.sk
June 1, 2010
Nejde to ja som to šupol na stranku a nič sa nedeje ako keby som tam niš nedal,, nejde to.... Pls rares@azet.sk
napiš Link na niečo take,,JA chcem Html kod ktori šupnem na link a keď pôjdem na ten link Popit odomna Heslo aš potom ma pusti A hladam uš pekných 7 Hodín! :(
PROSIM Napiš na Rares@azet.sk ....
June 21, 2010
This works perfectly- only thing, when one types in the incorrect password, lines of code appear in the browser. Is there any way to just leave the page blank?
June 25, 2010
Thank you
lkphoto5 [anti-spam] hotmail.com
July 22, 2010
Does not work in IE 8, so bummed. I hate IE, but majority of my clients use it. Any way to fix this bug?
drin_world [anti-spam] hotmail.com
August 6, 2010
please back my pasword
docross [anti-spam] contractor.net
October 1, 2010
Works great for me. Thanks, Ive added Zurbrag.com to my favorites tools.
torwal
October 6, 2010
Online Tools: Password Protect / Encode HTML
Can I make a "incorrect pw" site?
Jalmar
October 6, 2010
These can be cracked very easily. Just type in "null" without quotes. So you may not want to use this :P
freelancer
October 6, 2010
what a joke about "null". cannot be cracked like this unless you protect very short text. BUT read a note in requirements, it says "it cannot encode short text due to the nature of encoding. Longer passwords result in better encoding."
farisrehman [anti-spam] hotmail.co.uk
October 14, 2010
Works but when I tested it, you can write anything in the password box and it'll always work (PLZ HELP :( ;( :S;S ;( ;@
infoemynow [anti-spam] yahoo.ca
October 22, 2010
I want to creat a password protection at the entrance of the site. Please what do i do?
R
November 10, 2010
@infoemynow You should be able to use .htaccess on your server to password protect your site.
January 4, 2011
Works!

Thanks!
Jim
January 17, 2011
Is there an IE8 fix? I have tried for the past 4 hours to no avail.
McG, SA
February 8, 2011
It does not work on IE, only on the MFF... but yohhh this is awesome..fantastic....!!!! keep up...Thank you so much for these.
Typhon
March 12, 2011
Yeah, um, this happens to be one of the greatest things I have ever stumbled upon the web. It's ingenious, really.
Tony
March 20, 2011
For IE8, this works fine if you go to Tools/Internet Options/ Security and under 'Custom level', find Scripting and tick "Allow websites to prompt for Information...."
stars
May 9, 2011
how can I undo it?
Aixx'
May 29, 2011
Yeahhhhhhhhh Thank You Very Muchh :D
Jack Sparrow
August 16, 2011
What a Magic i love this.... Thxxxx
frank [anti-spam] flj.net
August 22, 2011
Works great except at the top of my HTML page after entering the password the url for the page is at the top of my page? How to I stop that from appearing? Thanks.
Thalaal
November 7, 2011
Worked successfully !! Thanks a lot.
But the problem is it don't display the wrong password error message :P
November 22, 2011
bad idea to use javascript as a deterrent against unauthorised users. USE PHP and SQL instead, or more simply, just modify the htaccess file for easy win.
rana.rajesh83 [anti-spam] gmail.com
December 9, 2011
How can i make password box to type star instead of letters. I dont want to show password to other viewer.
January 26, 2012
This code is excellent! :)
February 1, 2012
not working. it does not protect page. any password typed will open the page
February 1, 2012
ITS PERFECTLY WORKING. THANKS.
February 3, 2012
Thanks
February 10, 2012
Cool
February 25, 2012
good
Tony
February 27, 2012
DOES NOT WORK. Hit cancel and you still get the 'protected' page anyway. Besides, type the direct url for the page this is supposed to protect and it still shows up. This does not protect a page at all.
umerata27 [anti-spam] gmail.com
March 4, 2012
Hey its amazing no browser can find the password neither can some developer by looking at the code , How do you do that
umerata27 [anti-spam] gmail.com
March 4, 2012
For every one who thinks this is not working .
Heres how you make it work.
Use this html


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>


</body>
</html>

put your contents inside thebody and then try it .
you guys are not using proper html
ankushminda [anti-spam] gmail.com
March 28, 2012
its just OSM
Eli Schwartz
April 24, 2012
I just copied my page (with all the content) and it encoded just fine, works perfectly
April 25, 2012
Great, love it, thank you!
May 14, 2012
+100 love :D
joutube [anti-spam] live.be
May 30, 2012
Works perfect for me!! Thanks ;)
Tony
June 7, 2012
I created a PW HTML page. On correct PW the user hits a button to move to protected page.
BUT!
Google search allows people to go directly to my protected page.
Answer- rename protected page to gobledegook. I had to rerun this ap again as the link had a new name.
Kent
July 17, 2012
I also thought this was not working. All I did was enter in the password and hit the button. I copied the code generated and inserted it at the top of my html. Then it behaved like some folks are saying where it did not matter what password you used or if you hit cancel, it would take you to the page with no problem.

But then i actually read the instructions again and noticed I was supposed to enter the password, THEN paste the contents of the html page I wanted protected in the the first large box, THEN hit the encrypt button. It then returns with the code you are to use in place of your original code. Now it works.
July 27, 2012
Thank you so much!!!
khanbilal609 [anti-spam] yahoo.com
August 9, 2012
i like it
August 16, 2012
works fine - thanks to Ken above.
August 16, 2012
works fine - thanks to KENT above. (sorry!!)
glygn22 [anti-spam] hotmail.com
September 26, 2012
Is there any way of changing the way the login form box looks using CSS?
jygrigord [anti-spam] gmail.com
October 11, 2012
hello can we change password please? thanks
jygrigord [anti-spam] gmail.com
October 11, 2012
if i want change my page because i want add photo how can i do for it with code protect? thanks
November 30, 2012
Only problem is you must re-encrypt the page every time you need to make changes to page
hyokim07 [anti-spam] gmail.com
January 23, 2013
Thanks; however, it is a bit problem that it shows actual characters as you type the password.
kostas
February 16, 2013
Good job boys. Keep walking...
jagadish4444 [anti-spam] gmail.com
February 27, 2013
its working fine for me
but my html ,when view on browser is appended with two tilde symbols
please help me to resolve this
jagadish4444 [anti-spam] gmail.com
February 27, 2013
its working fine for me
but my html ,when view on browser is appended with two tilde symbols
please help me to resolve this
weelz [anti-spam] telus.net
February 28, 2013
It worked but when password page came and I tried to follow link got message "This webpage not found". Link works when not password protected.
john
March 20, 2013
funciona!!! para quem diz que nao funciona leia as instruoes tansos
J. Lee
May 15, 2013
Great!
kdmcshane [anti-spam] gmail.com
June 27, 2013
I put this on my tumblr in the html, but I'm running into a slight problem. It has be type the password in twice when I visit my page and anytime I click next or follow a link in the page to go to my next page of content I have on my tumblr, it has me type in the password twice again.

Is there a way to fix this where once you type in the password for the page, its done and you never have to type in the password again.
July 5, 2013
Great. Really helped me a lot. Best reg from Greece
stuemccall [anti-spam] gmail.com
November 9, 2013
Hi
Works fine when entering the correct password but if wrong password entered the screen fills with text characters
I thought it would return to password entry box
Any idea's
Cheers
Stue
Larry
November 27, 2013
Stue, I suggest you re-read the overview at the top of this page, and this time comprehend it.
Shaun
January 8, 2014
HOW DO I UNDO IT?..............I WANT MY ORIGINAL CODE BACK..PLEASE HELP SOMEONE!!!
Emily Molloy
February 15, 2014
It works on Tumblr as well... Thank you!!! :) x
Tim
March 14, 2014
Nice code works for me but how to redirect to error page if wrong password is entered ?????
For Tim
March 14, 2014
It doesn't store correct password for security reason, so it can't determine if entered password is correct.
Tim
March 15, 2014
I see,...thanks!!

But is there any workaround,..sorry to trouble you??
March 19, 2014
Shows protected html even if password is incorrect...
Tim
March 20, 2014
Works for me,...!!!! If I enter wrong password I go to page which shows garbled text!Never opened protected page with incorrect password!!
kinanda21 [anti-spam] yahoo.co.uk
April 15, 2014
Thanks very much, Great help, works perfect, I think lots of people not reading instructions. Garbled text is a good response to incorrect password, The few other constructive comments on this page could only be sorted with something quite a bit more complex
kingtricks.com72 [anti-spam] yahoo.com
May 28, 2014
You can also Read Related below Post

How To Add Own HTML Encoder/ Decoder Tool To Blogger - Visit Below Post Link

<a href="http://www.kingtricks.com/add-html-encoder-decoder-tool-blogger/">http://www.kingtricks.com/add-html-encoder-decoder-tool-blogger/</a>

Add Comment

E-mail or Name: Not required. Email will be protected from spammers

Comment: Please do not post unrelated comments

Anti-spam: Please enter (31344863) into the box