Generates regex patterns for password validation with customizable requirements like minimum length, character types, and complexity rules. Access via MCP in Cursor or Windsurf, or REST at `/v1/regex/pattern/password`. Example: specify 8+ chars with uppercase, lowercase, and numbers to get `^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d]{8,}$`. Returns deterministic patterns that work across programming languages.
curl "https://tinyfn.io/v1/regex/pattern/password" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/regex/pattern/password', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/regex/pattern/password',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's regex tools:
{
"mcpServers": {
"tinyfn-regex": {
"url": "https://tinyfn.io/mcp/regex",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Call the endpoint with parameters for minimum length, required character types (uppercase, lowercase, numbers, symbols), and any custom rules. It returns a tested regex pattern ready for validation.
Yes, it's available as an MCP tool in Cursor, Claude Code, Windsurf, and other supported editors. Your AI assistant can generate password patterns directly during code reviews or development.
This generates tested, cross-language compatible patterns and handles complex lookaheads correctly. It prevents common regex mistakes like incorrect character class ordering or lookahead syntax errors.
Yes, you can specify custom allowed/required characters beyond standard alphanumeric and symbols. Useful for systems with specific character restrictions or requirements.
The patterns use proper lookaheads and anchoring to prevent common bypasses like partial matches or edge case characters. However, always combine regex validation with proper password hashing and storage practices.
Get your free API key and start using Get Password Pattern in seconds.
Get Free API Key