FindSoftware

bluemonday

HTML sanitizer for Go that removes markup outside an allowlist from untrusted input, such as user generated content.

bluemonday is an HTML sanitizer for Go. It takes untrusted HTML, such as user generated content, and returns HTML limited to an allowlist of elements and attributes. A Go server builds a policy, either from the two policies the library ships or from its own rules, and applies it to each input. The library is installed with go get.

Worth knowing

The README asks that bluemonday run after any other HTML processing, such as Markdown rendering, so that no unsanitized markup is added later. Script and style elements are dropped unless the policy enables them.

Identity

Status
Active
Maintainer
David Kitchen2
First release
20184

Rendering and deploy

Install with
go get3

Releases

Current major version
15
Last release
2024-07-045

Adoption

GitHub stars
3,7311
Contributors
296

Why these figures do not compare

Sources

  1. 2026-11-04: links, Written in, GitHub stars
    api.github.com/repos/microcosm-cc/bluemonday
  2. 2026-11-04: Maintainer, License, License model
    raw.githubusercontent.com/microcosm-cc/bluemonday/main/LICENSE.md
  3. 2026-11-04: Runtime, Categories, Install with
    raw.githubusercontent.com/microcosm-cc/bluemonday/main/README.md
  4. 2026-11-04: First release
    proxy.golang.org/github.com/microcosm-cc/bluemonday/@v/v1.0.0.info
  5. 2026-11-04: Current major version, Last release
    proxy.golang.org/github.com/microcosm-cc/bluemonday/@v/v1.0.27.info
  6. 2026-11-04: Contributors
    api.github.com/repos/microcosm-cc/bluemonday/contributors?per_page=1

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON