How to hide source code on HTML pages?
Thread poster: Roomy Naqvy

Roomy Naqvy  Identity Verified
Local time: 20:30
English to Hindi
+ ...
Aug 24, 2003

Dear All,
I would like to know how it would be possible to hide source code on HTML pages with both NO RIGHT CLICK as well as NO VIEW SOURCE. I have found freeware javascripts which do disable right click but they are of no help because they still allow View Source. Any ideas?

Direct link Reply with quote

Michael Bastin  Identity Verified
Local time: 17:00
English to French
+ ...
no luck neither Aug 24, 2003

I also only have found some javascript to disable right-clicking, but never found any to disable the view source function. All I have heard is that any protection can't prevent any advanced webmaster to review your code.

Good luck, also curious to know.

This might help you to encrypt partially your source code:

Direct link Reply with quote
bergazy  Identity Verified
Local time: 17:00
Croatian to Italian
+ ...
Atrise HTML lock Aug 24, 2003

Maybe this software will suit your needs.

Direct link Reply with quote

Gerard de Noord  Identity Verified
Local time: 17:00
Member (2003)
German to Dutch
+ ...
You can't really hide HTML source code Aug 24, 2003

Michael Bastin wrote:

All I have heard is that any protection can\'t prevent any advanced webmaster to review your code.

That\'s right. You can make it more difficult to read but you can\'t protect your source code.


Direct link Reply with quote

Natalie  Identity Verified
Local time: 17:00
Member (2002)
English to Russian
+ ...

Yes, HTML code cannot be really hidden, Aug 24, 2003

there is no real way to stop people from veiwing your html, if someone is determined to see your code they will. But there are lots of ways to lock, password-protect or encrypt it:

To begin with, take a look at this page:

Some more examples:


Free 30-day trial available:

Another one:

If it isn't enough, just go to Google, type in "hide source code HTML" and press enter...

Direct link Reply with quote

Uwe Kirmse  Identity Verified
Local time: 17:00
Polish to German
+ ...
You can't hide it, but... Aug 24, 2003

...there is a nice trick, that makes it seem to be hidden. Just have a look at my homepage Just click at "view source code" and have a look, what is displayed. If you scroll down, you'll find the code of course, but some people may believe, that it's really hidden. (The words "Geschützter Quellcode - zrodlo chronione" in the first line mean "Hidden source code", in German and in Polish.) In the source code you'll also find a Java script for "no right click". You may use it, it's from the page, where you can find more nice scripts.

Direct link Reply with quote

To report site rules violations or get help, contact a site moderator:

You can also contact site staff by submitting a support request »

How to hide source code on HTML pages?

Advanced search

SDL Trados Studio 2017 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2017 helps translators increase translation productivity whilst ensuring quality. Combining translation memory, terminology management and machine translation in one simple and easy-to-use environment.

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »

All of
  • All of
  • Term search
  • Jobs