Regex Generator
Generate regular expressions for email, phone, URL, dates, IPv4, ZIP, semver.
Inputs
Results
// email · flags: none /^[^\s@]+@[^\s@]+\.[^\s@]+$/ // tests: ada@example.com — match dev+tag@sub.domain.co — match ada@example — no match
About this tool
Pick a preset to get a copy-paste JavaScript regex with your chosen flags, plus three sample strings with live match results.
How to use
- 1Pick a preset: email, phone, URL, date, IPv4, ZIP, or semver.
- 2Pick the flags — none, i, m, or g+i.
- 3Optionally paste a custom pattern to override the preset; wrapping /.../ delimiters are stripped automatically.
- 4Copy the regex literal from the output and check the three test rows to see which sample strings match.
Frequently asked questions
Related tools
Base64 Encoder / DecoderEncode and decode Base64, with URL-safe mode.URL Query String BuilderBuild and parse URL query strings.Password Hash GeneratorGenerate and compare password hashes.Code DiffDiff two code snippets with word-level detail.UUID GeneratorGenerate UUID v4 and v7 in batches, with prefixes.Base64 Data URI GeneratorTurn text, CSS, JS, JSON, or SVG into a data:<mime>;base64, URI — UTF-8 safe.