This page has been robot translated, sorry for typos if any. Original content here.

Online Text Compressor in PHP (+ download PHP script)

On this topic:

Зашифровка HTML кода или любого текста

On most sites, HTML code is publicly available, which means that any webmaster can easily reproduce it simply by looking at the screen of the finished web page.

However, some optimizers view the HTML source code of their web projects as a trade secret or know-how.

Save from unauthorized use of their intellectual work, help this service, with which you can quickly encrypt the source HTML code via javascript.

Encodes html or any text in java-script. Conveniently to hide any information (for example, from rips or e-mail protection from spam.)

Download A JavaScript Compressor [script PHP] packer-php.rar packer-php.rar Virus Free by KAV

script to pack:

Note: This page needs to be updated for version 3.0.


All statements, including function declarations , must be terminated with semi-colons.

This is an algorithm for the game with one exception. You must correctly terminate all JavaScript semi-colons statements. This includes function declarations.

Here is an example of correct semi-colon terminated javascript:

  // sample code

 var input, output;

 // notice the semi-colon at the END of function declarations

 onload = function () {
  input = document.getElementById ("input");
  output = document.getElementById ("output");
  clearAll (true);

 function packScript () {
  output.value = pack (input.value);

 function clearAll (focus) {
  output.value = input.value = "";
  // the "if" statement is NOT terminated with a semi-colon
  if (focus) {
  input.focus ();


Base62 encode

Shrink variables


Debug code (;;;)

Three semi-colons ( ;;; ) are treated like single-line comments.

For example, this code:

  ;;;  alert ("TEST!"); 

Would be removed by the packing program.


Packed scripts should be unpacked on all browsers that support JavaScript. Only basic JavaScript functionality is used.

Some browsers may not support the packer itself. The web interface requires DOM support. Legacy browsers will display a disabled interface.