node-md5

A tiny, dependency-light JavaScript function for computing MD5 hashes of strings, buffers, and byte arrays.

Library
npm
v2.3.0
914 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
41 /100 Fair
Development Activity 0
Maintenance 20
Community 56
Maturity 60
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
48 /100 Fair
Architecture 40
Code Quality 45
Innovation 20
Learning Curve 85

md5 is a single-purpose JavaScript library that hashes messages using the MD5 algorithm. It accepts strings, Node.js Buffers, arrays, and Uint8Array instances, and returns a hex digest by default (with options for raw bytes or a binary string). The implementation is a pure-JavaScript port of the classic MD5 algorithm originally published by Ronald Rivest in 1991, adapted from Jeff Mott’s CryptoJS implementation.

Because it has no native bindings and only a handful of small dependencies (crypt, charenc, is-buffer), it works identically in Node.js and in the browser (via bundlers like webpack). It has shipped as the md5 npm package since 2011 and is widely used as a drop-in hashing utility for cache keys, checksums, Gravatar URLs, and other non-cryptographic identity-hashing use cases.

What You Get

  • A single md5(message, options) function that returns a 32-character hex digest by default
  • Support for hashing strings, Node.js Buffers, plain arrays, and Uint8Array instances
  • An asBytes option to get the raw digest as a byte array instead of a hex string
  • An asString option to get the digest as a binary string, plus an encoding: 'binary' option for binary-encoded string input
  • Isomorphic support for both Node.js and browser bundles (webpack config included in the repo)

Common Use Cases

  • Generating Gravatar avatar URLs from a hashed email address
  • Producing cache keys or checksums for request/response deduplication
  • Computing quick file or content fingerprints where cryptographic strength isn’t required
  • Hashing form or upload data client-side before sending it to an API
  • Providing a lightweight MD5 fallback in environments without Node’s built-in crypto module (e.g. certain browser bundles)

Under The Hood

Architecture

The library is a single self-contained module (md5.js) wrapped in an IIFE that exports one function. Internally it delegates byte/word conversion to the sibling crypt package and string-encoding handling to charenc, while is-buffer detects Node.js Buffers so the same code path can normalize strings, buffers, arrays, and typed arrays before running the standard MD5 compression rounds (_ff/_gg/_hh/_ii). There is no class hierarchy or plugin surface — all branching for input type and output format happens inline in the exported wrapper, making the whole library effectively one function plus its four auxiliary round functions.

Tech Stack

Plain, untyped JavaScript with no build step for the library itself — md5.js is shipped directly as the package’s main entry. It depends on three small same-author-adjacent helper packages (crypt, charenc, is-buffer) rather than a general-purpose crypto framework. Mocha is used for tests and webpack is configured (via webpack.config.js) purely to produce a browser bundle for the demo page, not as part of the published package.

Code Quality

test.js runs a small mocha/assert suite covering known hash vectors, Buffer and Uint8Array input, encoding options, and error-throwing on null/undefined input — a reasonable but limited set of cases for a single-function library. There are no TypeScript types, no linter configuration, and no active CI workflow (the README’s Travis badge points at a service the project no longer effectively uses); naming and error handling are simple and consistent throughout the small codebase.

API Design The public surface is intentionally tiny: one function, one options object with three well-documented flags (asBytes, asString, encoding). This minimizes onboarding friction — there is effectively nothing to configure — at the cost of no support for streaming large inputs or incremental hashing, which some hashing libraries offer.

Used by 15 apps in this directory

TypeScript
96%
MIT

Payload CMS

Blogging · CMS · Developer Tools

45,458

The open-source, Next.js-native headless CMS that lives inside your /app folder and gives you a full TypeScript backend instantly.

View details
92
Repo Health
88
Technical
65
Dependency
Built with
TypeScript 96%
Updated 5 days ago
TypeScript
90%
MIT

Plasmic

CMS · Design Tools · Low Code Platforms

7,125

The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.

View details
81
Repo Health
78
Technical
64
Dependency
Built with
TypeScript 90%
Updated 6 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago
TypeScript
81%
AGPL 3.0

Postiz

Automation · Social Media

37,683

The agentic social media scheduler — AI-powered content creation, 33-platform posting, and team workflows, all self-hosted.

View details
92
Repo Health
70
Technical
63
Dependency
Built with
TypeScript 81%
JavaScript 11%
Updated 6 days ago
TypeScript
96%
Other

Refly

AI Development · Automation · No Code Platforms

7,537

Build deterministic, versioned agent skills from natural language—run them anywhere from Claude Code to Slack.

View details
68
Repo Health
76
Technical
63
Dependency
Built with
TypeScript 96%
Updated 1 weeks ago
TypeScript
98%
Apache 2.0

Tianji

Analytics · Monitoring

3,119

Replace Google Analytics, UptimeKuma, and Prometheus with one self-hosted platform that tracks websites, monitors uptime, and reports server health.

View details
86
Repo Health
76
Technical
64
Dependency
Built with
TypeScript 98%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers