ScriptCompress.com's JavaScript, Text, PHP & HTML Packers

Your JavaScript or Other (Text, HTML, PHP):

bytes.

Minified, Packed or Compressed Self Extracting Code:

bytes.

JS PACKERS:

PHP PACKERS:

ENCODE: TOOLS:

page often until we fix the leaks...

WHAK Settings: Be @ least characters long, separator , start @ charcode #.

Upload file:

Import file:

    About Our 15 Packers & Descriptions:

    Feel free to download this page as it will work as a portable application on pretty much any operating system (linux, Windows, Mac, will open with web browser on mobile cell phones, iPods, iPads, laptops, PC, TV and many other smart devices). All JavaScript, HTML and CSS source codes are embedded, compressed and packed (using tools on this very page) to a self extracting (plus self running automatically) JavaScript. Before minifying, packing and compressing, this app was almost 700KB (now it's under 100KB).

  1. WHAK: Basically it seeks out repeated words and phrases and then replaces them with single unused UTF-8 characters. It isn't really compression, but we can achieve up to 50% reduction (average 20%). It has the fastest executing unpacker that uses the least amount of CPU power. Best for scripts under 200KB.
  2. ZAP: A faster version of WHAK that doesn't do as good of job. But, now GZIP has ability to still further compress close to normal (leaves enough room for further compression). Best for scripts under 250KB.
  3. BOOM: This is our fastest packer and unpacker, it doesn't compress as well though. A MUCH FASTER version of ZAP that doesn't do as good of job. But, now GZIP has ability to still further compress close to normal (leaves enough room for further compression). Best for scripts under 1MB.
  4. BZIP: Actual compression in Bzip2! Self extracting package is created here in Javascript that will automatically extract and run. bzip2 is a free and open-source file compression program that uses the Burrows-Wheeler algorithm. Best for scripts over 15KB and under 50MB.
  5. LZ-WHAK: LZW mashed up with LZMA for faster results than LZMA and better compression than LZW. Lempel-Ziv-Welch (LZW) is a universal lossless data compression algorithm created by Abraham Lempel, Jacob Ziv back in the 70s. LZW is what GIF images are compressed with. Best for scripts 15KB to 20MB.
  6. BAM: A base62/Base2 encoder and compressor. Not the best results for compression, but great obfuscation. This is just a clone of the original JavaScript packer made in 2007 (we didn't make, but it was inspiration, it's on http://dean.edwards.name/packer/). Best for scripts under 5MB.
  7. WHAM: Extreme minifying of code for the demo scene. It is so aggressive that it may crash on scripts bigger than 2 to 5KB. Best for scripts under 10KB.
  8. ZONK: Extreme minifying of code for the demo scene. It is so aggressive that it may crash on scripts bigger than 2 to 5KB. Best for scripts under 10KB.
  9. POW: Slow, but extreme minifying of code for the demo scene. It is so aggressive that it may crash on scripts bigger than 2 to 5KB. Best for scripts under 10KB.
  10. LZW: Testing out leaving data raw with old school LZW (GIF encoding compression). Seems we get better results actually Base64ing it instead...
  11. Base64, Escape, Octal & Hex: These packers encode rather than compress, so scripts will be bigger!
If you are intending to pack up HTML rather than JavaScript, here are some tips:
  1. Check off (no checkmark) JavaScript "Minify" checkbox to "Uglify" near the top of this page.
  2. Pack with WHAK algorithm (for example).
  3. Change eval(W); to document.write(W); and now it will print out & render your HTML.
  4. Now wrap it in a script tag (then it's HTML code again, but smaller) like
    <script>
    var W,H,A,K='';W=/* ...REST_OF_CODE... */;
    document.write(W);
    </script>
If you are intending to pack up plain text rather than JavaScript, here are some tips:
  1. Check off (no checkmark) JavaScript "Minify" checkbox to "Uglify" near the top of this page.
  2. Pack with WHAK algorithm.
  3. Change eval(W); to document.write('<textarea>'+W+'<\/textarea>');

    HINTS & TIPS:

  • This tool is handy for many things, not just compressing (encoders, marklet generator, search & replace and more).
  • If you have any issues with JavaScript, switch to Uglify mode (out of Minify mode).

NEW FEATURES:

-query string parse of "url" variable to get source code from any web site or plain text from an online file. SAMPLE: http://www.scriptcompress.com/JavaScript-Packers.htm?url=http://www.acme.com (bookmarklet).
-now you can swap/switch words/letters/characters (not just replace)
-use URL to input data here (sample: query string or hash tags)
-5,000 top trigrams (English word pieces of common frequencies) pre-added to WHAK for word list (comma delimited)
-add customized word list to target more specific key phrases
-drag and drop any file to have it's text imported automatically
-turn off minifier or do minifying only
-import an online file as plain text
-file upload form or drag and drop a file
-search/replace text in result boxes
-max & safe modes for minifier (JavaScript parser and error fixer)

    TOOLS FOR PROGRAMMERS:

  1. 25 Encoders in 1 (advanced)
  2. JavaScript ReWriter/Parser/Error Checker
  3. HTML 2 PNG (demo)