HTML,CSS, & JavaScript Source Code Minifiers & Compressors

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

This script can take your entire web page or just a tiny piece of code and  
minify it or compress (Bzip, LZMA, etc) and pack it to a JavaScript so it i
s client side decompressable through any web browser. The WHAK JavaScript p
acker targets repeated words and replaces them with a single character (whe
n the created JavaScript runs, it reassembles everything), so it may make y
our page half the size if many words are repeated. It will hide much of you
r data from spam bots. Sometimes you don't want everything crawled! Key wor
ds will still be viewable in the script generated, but no words will make a
ny sense as they are in random order that do not make sentences.

You can just do snippets of code or complete web page (drag and drop),




'#$%'.split(''),H='nerdful gmail com'.split(' ');for(A in H)K=K.split(W

Email harvesters are constantly crawling the web looking for addresses to s
pam. To prevent these harvesters from finding their addresses, many people  
have attempted to obfuscate them before posting in a public place (if you a
ren't already, I highly recommend it). I've done this for years, and while  
there are many sites that will obfuscate them for you, I've never really be
en able to find any that handled the exact options that I wanted.

This HTML to JavaScript converter is kind of a text encoding system, but un
like Base64 and URLencode decoding/encoding, this tool makes the JavaScript
 smaller than the original HTML code given (Base64 will inflate by 30%, URI
encode will increase the size by over 40%).

DemoScene byte hackers will find this web based tool (runs VIA web browser  
on operating systems such as Linux, Mac, Windows, Android, etc) handy for m
aking 2KB to 64KB 3D demo canvas code packed up (semi compressed, we have o
ther tools for extreme packing), when some contest you entered has strict f
ile size limits, every byte matters!

This tool makes for handy injecting a data clump to an iframe (use foreignO
bject for Iframing, change document.write(K) to iframeID.src=K) inside a  
SVG image (now Gzip it and rename *.SVG to *.SVGZ, was able to make a 8MB H
oly Bible app 1MB, fits on floppy now), here is a sample (hosted on free im
age hosting site).

Sometimes chunks of code you want obfuscated so spam bots do not get links  
or email. On free hosting sites you can compress a file (embed JavaScript,  
Flash, sounds, videos, 3D WebGL, images, etc VIA Base64 and dataURI tricks  
so you have one complete file with no external files), even though the serv
er has no compression.

One main disadvantage to this tool is the obfuscation, most search engines  
cannot decode the script created here, so SEO masters will notice less keyw
ords used from a page.

This unique web based software acts similar to WinZip/WinRar/7zip enabling  
you to compress your HTMLs into much smaller HTM (embedded JavaScript that  
self extracts and is self executing) archives with compression ratio of 60%
 and more! Your web pages will load quicker and you'll save both your web t
raffic and disk space.

Unzipping/Unbzip/UnLZMA compressed data with created documents in browser i
s completely transparent for CSS, Java and other scripts, working on the cl
ient side, including the scripts contained are between the head and /head t
When using this tool, it will convert and escape all those troublesome sing
le quote, double quote issues that always throw you curve balls when creati
ng strings in JavaScript.

HTML to JavaScript Convertor - takes your markup and converts it to a serie
s of document.write() statements that you can use in a block of JavaScript.
 This clever utility converts normal HTML code to dynamically generated Jav
aScript instead. Very useful in applications where the code must be dynamic
ally generated, such as contents inside a JavaScript scroller, text of a ra
ndom quote script etc.

If you've ever tried to make some normal text containing characters like '  
into a JavaScript variable, you will know how frustrating it can be when yo
u miss one, or you miss a \ or a line break or a script tag. Well, let this
 script do it for you. This online tool formats a HTML code for the output  
through JavaScript. To convert a HTML code correctly, you can use single AN
D/or double quotes in HTML code.

To ensure that any HTML that you want generated from Javascript document.wr
ite statements does not get misinterpreted as Javascript this application w
ill place a slash (\) in front of certain characters in the text. Each line
 of HTML source also needs to be separated by \n so that the linefeeds will
 be correctly inserted into the generated HTML.

Escapes or unescapes a JavaScript string removing traces of offending chara
cters that could prevent interpretation. The following characters are reser
ved in JavaScript and must be properly escaped to be used in strings: Horiz
ontal Tab is replaced with \t Vertical Tab is replaced with \v Nul char is  
replaced with Backspace is replaced with \b Form feed is replaced with \
f Newline is replaced with \n Carriage return is replaced with \r Single qu
ote is replaced with ' Double quote is replaced with \" Backslash is repla
ced with \

Re: HTML,CSS, & JavaScript Source Code Minifiers & Compressors is a demo of a 2.1 MB web application minified and compressed with client side self extracting & executing JavaScript to 250 KB.

More downloadable tests/demos on of compression on huge bytecode web applications made with Emscripten.

Site Timeline