Boneyard Tools

Regex Pattern Builder for Common Formats

Pick a preset to drop in a tested regular expression for everyday formats like email, URL, IPv4, UUID, dates and hex colors, or check boxes to compose a password rule with the right lookaheads. Every pattern is copy-ready and built right in your browser.

How to build a regular expression

  1. Choose a preset such as email or UUID, or open the password builder.
  2. For passwords, set the minimum length and tick the character rules you need.
  3. Try a value in the live test box, then copy the finished pattern.

Examples

Email preset

Click the Email preset
^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$ which matches a@b.com

Password rule

Minimum length 8, require uppercase and a digit
^(?=.*[A-Z])(?=.*\d).{8,}$ which matches Abcdef12 but not abcdef

Frequently asked questions

Which presets are included?

Email, URL, IPv4, IPv6, US phone, ISO date, 24-hour time, hex color, slug, username, UUID, credit card and US ZIP. Each one is a well-known pattern that matches valid examples.

How does the password builder work?

Each rule you tick adds a lookahead, so requiring an uppercase letter adds (?=.*[A-Z]) and a digit adds (?=.*\d). The minimum length becomes .{min,} and the whole thing is anchored with ^ and $.

Are these patterns perfect for validation?

They cover the common, well-formed cases and reject obvious junk. Formats like email and credit card have edge cases no single regex captures, so treat the result as a strong first check rather than a full specification.

Do I include the slashes when I use the pattern?

No. Copy the source as shown and add it to your code with whatever delimiters your language uses, plus any flags you want such as i for case-insensitive matching.

Which regex dialect is this?

The patterns use JavaScript RegExp syntax, which shares most features with other languages. A few escapes and group types follow the ECMAScript rules, so adjust if your engine differs.

Is anything I type sent to a server?

No. The presets, the password builder and the live test box all run entirely in your browser, so nothing you enter is uploaded.

Related tools