Password Generator

Security

Generate secure random passwords with customizable options and strength checking.

Import

Import
import { password } from 'toolmetry';

API Reference

FunctionParametersReturnsDescription
passwordGenerateoptions?: PasswordOptionsstringGenerate a random password
passwordPassphraseoptions?: { words?, separator?, capitalize? }stringGenerate a passphrase
passwordStrengthpassword: string{ score, label, suggestions }Check password strength
passwordGenerateBatchcount: number, options?: PasswordOptionsstring[]Generate multiple passwords

Examples

Generate Password
import { passwordGenerate } from 'toolmetry';

const pwd = passwordGenerate({ length: 20, symbols: true });
// "aB3$xY9!kL2@mN5#pQ8"

const simple = passwordGenerate({ length: 8, digits: true, symbols: false });
// "aB3xY9kL"
Passphrase
import { passwordPassphrase } from 'toolmetry';

const phrase = passwordPassphrase({ words: 4, separator: '-', capitalize: true });
// "Brave-Cloud-Eagle-Flame"
Check Strength
import { passwordStrength } from 'toolmetry';

const result = passwordStrength('MyP@ss123');
// { score: 5, label: "Strong", suggestions: [] }

Try It Live