MiniME

Open-source JavaScript Minifier

MiniME is an open-source JavaScript minifier that runs on the .NET platform (Windows or Mono).

If you don't know what a JavaScript minifier is, you probably don't need one but there's a good explanation here.

At a Glance

  • Removes whitespace, comments and redundant braces, parentheses and semicolons.
  • Obfuscates local variables and nested functions.
  • Detects and removes constant variables.
  • Opt-in obfuscation of object properties and methods.
  • Opt-in comment preservation.
  • Optional code quality warnings (aka "lint") that won't hurt your feelings.
  • Can combine multiple scripts into one.
  • Can also compress CSS files.
  • Command line and .NET API.
  • Runs on Windows (.NET 3.5) and under Mono 2.6 (Linux/Mac OS X).
  • Tiny <50k download.

Command Line or API

Use it from the command line:

mm MyJavaScriptFile.js

or programatically from .NET code:

var mm = new MiniME.Compiler();
mm.AddFile("MyJavaScriptFile.js");
var minified=mm.CompileToString();

More Information

Use the links at the top right to find out more about the command line, API and how to get even better minification with directives.

You can also jump to the download page or contribute by making a donation or helping to improve the product.

License

Creative Commons License
MiniME by Topten Software is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://www.toptensoftware.com/contact.