WebMinCer

WebMinCer is a minifier for UTF-8 CSS, JavaScript, XML, HTML and JSON, written in C. It can also minify inline scripts, stylesheets and JSON data embedded in XML and HTML markup. JSON input is validated completely. For the other formats, many, though not all, classes of syntax errors are detected. When invalid input is recognized, precise error messages are printed.

The original and actively developed project is hosted on Codeberg.
Pre-built binary releases are also available on Codeberg.
Additionally this project is also mirrored on GitHub.

The name WebMinCer is a play on web, minification, and C, as well as the word mincer. The name reflects the tool's purpose: it effectively feeds web-language source files through a virtual mincer to produce compact output.

Design objectives

Documentation

Building and testing

WebMinCer uses a small Makefile with separate targets for optimized, debug, and test builds.

Object files are written to .build/obj for optimized builds and to .build/debug/obj for debug builds.

Build requirements are a POSIX shell environment, make, and a modern C compiler. The build uses the cc command by default, but you can override it, for example with make CC=clang or make CC=gcc.

Pre-built releases

Pre-built releases are available from the Codeberg release page. Download the binary archive for your operating system and processor architecture.

Linux and macOS archives use the .tar.xz format. Windows archives use the .zip format. Binary archives contain the release binary and a copy of LICENSE. Static Linux archives have -static in their names and do not require a system glibc installation.

Developer archives have names such as webmincer_dev_1.0_x86_64-linux-gnu.tar.xz. They include the release binary, debugging symbols, build information, and a copy of LICENSE for developers who need them.

Origins and relationship to cminify

WebMinCer started as a fork of cminify, the minifier originally developed by Jumping-Beaver (aka Lerchensporn). The original project and its design rationale are preserved in the original cminify README.

We are grateful to Jumping-Beaver for the substantial work that made this project possible. WebMinCer builds on that foundation, while its goals may differ slightly from those of cminify and it is intended to be developed more actively.

WebMinCer is an independent project. It is not intended to be a drop-in replacement for cminify, and its goal is not to push changes back into cminify. Users should therefore review the behavior and goals of WebMinCer before adopting it in place of cminify.

My other projects

See also my other projects.