cd /news/developer-tools/show-hn-javascript-json-and-css-mini… · home topics developer-tools article
[ARTICLE · art-75234] src=fossil.wanderinghorse.net ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Show HN: JavaScript/JSON and CSS minifier lib in minimal C89

A developer released a C89 library that minifies JavaScript, JSON, and CSS, weighing about 67KB total or 34KB for the JS parts. The library is not based on Node.js and avoids the "do no evil" license of Douglas Crockford's minifier. The JS minifier was generated by an LLM from a hand-written CSS minifier, then hand-refactored.

read1 min views1 publishedJul 27, 2026

For those 1.7 of you who may have need of a JavaScript or JSON minifier which (A) is not based on node.js and (B) is not "poisoned" by the "do no evil" license attached to Douglas Crockford's minifier (commonly seen in various projects over the years)... My C89 CSS minifier was recently broken down into a separate JavaScript/JSON minifier. It's trivial to embed in C, "should" build fine in WASM (that's untested, though), and is pretty small: the whole combined library is about 67kb, or about 34kb for just the JS parts (much of which is docs).

It minifies only spaces, not symbols, and does not offer any options for not minifying (e.g. adding newlines every so often for the sake of tools which treat extremely-long-lined files as binaries) except that by default it retains the first comment in the input if it's the first non-whitespace content (those are typically license/attribution blocks) but it can be told to optionally strip those too.

LLM disclaimer: the 100% hand-written CSS minifier was given to an LLM which, tasked with creating a JS minifier with the same interface, created the new variant in about 20 seconds. That code was later hand-refactored to consolidate parts common to the two minifiers (all of which were hand-written) but the JS-specific pieces are otherwise 100% LLM-generated.

Happy minifying!

Comments URL: [https://news.ycombinator.com/item?id=49067477](https://news.ycombinator.com/item?id=49067477)

Points: 1

── more in #developer-tools 4 stories · sorted by recency
── more on @douglas crockford 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-javascript-j…] indexed:0 read:1min 2026-07-27 ·