Compress URLs instead of shortening them: Ha.mr tool brings transparency and smaller QR codes

Compress URLs instead of shortening them: Ha.mr tool brings transparency and smaller QR codes

Traditional URL shorteners like TinyURL have been around for over two decades, but they come with two major drawbacks. First, they hide the actual destination link behind a random code, making it non-transparent and open to abuse—RickRolling is the best-case scenario. Second, all traffic passes through a third-party service that may have its own agenda. Developer PortalRunner came up with an alternative: don't shorten the link, compress it.

His project, Ha.mr (pronounced "Hammer"), takes a different approach. Instead of generating a random code and storing the mapping in a database—as conventional shorteners do—Ha.mr encodes the URL and applies a compression algorithm to the data. The key advantage is transparency: if the encoding and compression algorithms are open-source, which PortalRunner's are, users can inspect the link before following it. They can also self-host the entire solution for complete peace of mind.

Ha.mr also optimizes QR code generation. QR codes have a built-in alphanumeric character set that doesn't cover the full UTF-8 range. If you naively use random text, the code falls into byte mode, which requires significantly more QR real estate. By compressing the URL, Ha.mr reduces the number of bits that need to be stored, making the resulting QR code smaller and easier to scan at the same physical size. The text version of compressed links can still use UTF-8, including emojis, but it's not mandatory.

The project has a "why isn't everyone doing it this way" vibe. For serious use, PortalRunner recommends self-hosting the tool. The entire codebase is open, allowing anyone to verify the logic or run their own instance. The combination of compression-based URL shortening and QR code optimization makes Ha.mr a practical alternative to traditional services, especially for users who value transparency and control over their link traffic.

Tags: Software
Slate (Sl8) — the new social network. Post, grow your audience and earn — plus staking rewards that actually pay.
Invite codehXA6hX
Join Slate