Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

go-email-normalizer - email normalization for Go

Build Status codecov Go Report Card License Mentioned in Awesome Go

This is Golang library for providing a canonical representation of email address. It allows to prevent multiple signups. go-email-normalizer contains some popular providers but you can easily append others.


go get


package main

import (
	normalizer ""

type customRule struct {}

func (rule *customRule) ProcessUsername(username string) string {
	return strings.Replace(username, "-", "", -1)

func (rule *customRule) ProcessDomain(domain string) string {
	return domain

func main() {
	n := normalizer.NewNormalizer()
	fmt.Println(n.Normalize("")) //
	fmt.Println(n.Normalize("")) //
	fmt.Println(n.Normalize("")) //
	fmt.Println(n.Normalize("")) //
	n.AddRule("", &customRule{})
	fmt.Println(n.Normalize("")) //

Supported providers

  • Apple
  • Fastmail
  • Google
  • Microsoft
  • Protonmail
  • Rackspace
  • Rambler
  • Yahoo
  • Yandex
  • Zoho

Also you can integrate another rules using AddRule function (see an example above)