A standardized email and phone number normalization and hashing utility that follows UID2 specifications for email address and phone number processing. This tool ensures consistent normalization and hash generation for identity resolution and data matching purposes.
This application implements the UID2 email and phone ormalization and hashing standards, providing a reliable way to generate consistent, standardized hashes. The tool is particularly useful for:
- Identity resolution systems.
- Data matching and deduplication.
- Privacy-preserving user identification.
- Cross-platform user tracking.
The application follows the UID2 email normalization standard:
-
Whitespace Removal
- Removes all leading and trailing spaces.
- Removes all internal whitespace characters.
-
Case Normalization
- Converts all characters to lowercase.
-
Gmail-Specific Rules
- Removes all periods (.) from the local part.
- For addresses containing a plus sign (+), removes the plus sign and all subsequent characters before the @ symbol.
- Example:
Jane.Doe+Work@gmail.com
→janedoe@gmail.com
.
-
Domain Preservation
- Maintains the original domain part without modification.
- Preserves all characters after the @ symbol.
The application follows standard phone number normalization rules:
-
Character Removal
- Removes all non-numeric characters (spaces, dashes, parentheses, etc.).
- Preserves only digits 0-9.
-
Country Code Handling
- Ensures country code is present (defaults to +1 for US/Canada).
- Removes any '+' prefix from the country code.
- Example:
+1 (555) 123-4567
→15551234567
.
-
Length Validation
- Validates normalized phone number length (typically 10-15 digits).
- Ensures proper formatting for international numbers.
The application generates two types of hashes:
-
SHA-256 Hash
- 64-character hexadecimal string.
- Generated from the normalized email address.
- Example:
b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514
.
-
Base64 Encoded Hash
- 44-character string.
- Base64 encoding of the raw SHA-256 hash bytes.
- Example:
tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ=
.
- Node.js (v14 or higher)
- npm or yarn package manager
- Clone the repository:
git clone [your-repo-url]
cd [your-repo-name]
- Install dependencies:
npm install
# or
yarn install
- Start the development server:
npm run dev
# or
yarn dev
- Access the application at http://localhost:3000
- Enter an email address or phone number in the input field.
- The application automatically validates the input format.
- Click "Submit" to process the email address or phone number.
The application generates three outputs:
- Normalized email address.
- SHA-256 hash (hexadecimal).
- Base64 encoded hash.
Each output can be copied to the clipboard using the copy button.
This project is licensed under the MIT License.