Regex Pattern Library — Common Patterns

Copy-ready regular expressions for email, URL, IP address, phone, credit card, UUID, date, and more. Click to copy, test against your input, and export as JSON. Free, no upload.

Pattern reference

CategoryPattern nameBest forFlags
ValidationEmail addressSign-up forms, contact fieldsnone
Web & URLURL (WHATWG spec)Links, href attributesgi
Web & URLDomain nameHostname validationnone
Numbers & IDsUUID v4Database IDs, tokensnone
Numbers & IDsIPv4 addressIP allowlists, confignone
Numbers & IDsIPv6 addressIP allowlists, confignone
Numbers & IDsCredit card numberForm pre-validation (not secure)none
Numbers & IDsUS phone numberNorth American numbersgi
SecurityStrong password8+ chars, mixed case, digit, specialnone
Dates & TimesISO 8601 dateAPIs, log timestampsnone
Dates & TimesUS date (MM/DD/YYYY)US-localised datesnone
Dates & Times24-hour timeTimestamps, schedulesnone
Text & WordsSlug / URL safeURL slugs, identifiersnone
Text & WordsHashtagSocial media parsinggi
Text & WordsHex colorCSS, design tokensnone

Why these patterns and not others

Most regex libraries either show a one-liner that passes most test cases but rejects valid inputs, or they show the RFC-correct 6,000-character monster that no one can maintain. This library takes a middle path: patterns that pass real-world inputs with known limitations clearly documented. Email uses the RFC 5321 practical subset, not the full RFC 5322 ABNF. URL uses the WHATWG spec, not the RFC. IPv4 handles dotted-quad with optional leading zeros. Credit card uses Luhn-aware length rules.

The copy button encodes the pattern for JavaScript regex literal syntax (`/pattern/flags`) where needed. For PCRE/PHP use the same pattern without delimiters. For Python, prepend `r""` or use the `re` module directly. For Go, use `regexp.MustCompile`. For .NET, the same literal works in most cases.

Pattern categories explained

Validation patterns enforce structure: they use `^` and `$` anchors to ensure the whole string matches. Search patterns leave anchors off so you can find matches inside longer text. The grid below labels each card with its primary use — validate or search — and the appropriate flags (`g` for global, `i` for case-insensitive).

Date patterns cover ISO 8601 (YYYY-MM-DD), US (MM/DD/YYYY), EU (DD/MM/YYYY) and ISO with time. Note that DD/MM/YYYY cannot be reliably distinguished from MM/DD/YYYY without context — both are valid formats for different locales, so choose based on your audience.

Next steps

Frequently Asked Questions

How do I use these patterns?
Click any pattern card to copy it to your clipboard. Paste it into your code, a regex tester, or a search-and-replace tool. Most patterns are ready to use as-is; read the Notes column for anchors, delimiters, or language-specific caveats.
Are these patterns production-ready?
These are starting points, not battle-tested validators. Email (RFC 5322) and URL (RFC 3986) regexes are long by necessity — a short email pattern will reject valid addresses. Always validate against a representative sample before deploying, and prefer a purpose-built library for security-sensitive cases like credit card numbers.
Is my data sent to a server?
No. Every tool on jsonversal runs entirely in your browser using the Web Crypto API, File API, and Clipboard API. Nothing is ever uploaded — not even the JSON you paste in.
Do I need an account or API key?
No signup, no email, no API key. All tools are free to use with no signup required.
Can I use these tools offline?
Yes. Once the page loads, all tools work offline. There are no external API calls or CDN dependencies at runtime.
🔒
Your data never leaves your device

All processing happens in your browser. No uploads, no tracking, no servers. Your API keys, configs, and private payloads stay private — 100% client-side.

esc
↑↓ navigate ↵ open esc close