Test and debug regular expressions in real-time. Live match highlighting, capture groups, substitution preview, and pattern explanation. 100% client-side — nothing leaves your browser.
Testing regular expressions doesn't need to be painful. Three steps and you're matching.
Type your regex in the pattern field. The tester validates it in real-time and shows whether the pattern is valid or has syntax errors. No need to press "run."
Toggle flags like global (g), case-insensitive (i), or multiline (m) using the buttons in the toolbar. The flags are reflected in the pattern display instantly.
All matches highlight in the test string as you type. The Matches tab shows full match details — capture groups, named groups, and index positions for every hit.
Click "Replace" to enable substitution. Enter a replacement string using $1, $2, $& backreferences and see the transformed result update live below the test area.
These patterns cover 90% of everyday regex tasks. Click "Library" in the toolbar to load any of them instantly.
Match email addresses with [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}. Covers standard formats without being overly strict — perfect for form validation.
Extract URLs with https?://[^\s/$.?#].[^\s]*. Handles http and https, query strings, fragments, and paths. Use capture groups to extract components.
Validate IPv4 with \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b. For strict validation (0-255 per octet), use alternation with ranges: (25[0-5]|2[0-4]\d|[01]?\d\d?).
Match opening tags with <([a-z][a-z0-9]*)\b[^>]*>. Group 1 captures the tag name. Remember: for complex HTML parsing, use a proper parser — regex is fine for quick extraction.
Match currency like \$[\d,]+\.?\d* or any decimal with -?\d+\.?\d*. Capture groups let you separate dollars from cents: \$(\d+)\.(\d{2}).
Match ISO dates with \d{4}-\d{2}-\d{2} or US dates with \d{1,2}/\d{1,2}/\d{2,4}. Named groups make extraction clean: (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}).
This tester uses JavaScript's native RegExp engine, which is ECMAScript-compliant. This is the same engine used in all major browsers and Node.js. If your regex works here, it works in JavaScript.
Capture groups are created with parentheses (). They extract parts of a match. For example, (\d{4})-(\d{2})-(\d{2}) on "2024-01-15" gives Group 1: "2024", Group 2: "01", Group 3: "15". Named groups use (?<name>...) syntax for readability.
g (global) finds all matches instead of just the first. i ignores case. m makes ^ and $ match line boundaries, not just string boundaries. s makes . match newlines too. u enables Unicode support. y (sticky) matches only at the lastIndex position.
Click "Replace" in the toolbar, then enter a replacement string. Use $1, $2 etc. for numbered group backreferences, $& for the full match, $` for text before the match, and $' for text after. Named groups use $<name>.
Completely. This tool runs 100% in your browser using JavaScript. No data is sent to any server. Your patterns and test strings are never stored, logged, or transmitted anywhere. Check the network tab in DevTools if you want proof.
Different regex engines have different features and syntax. JavaScript doesn't support lookbehinds in older browsers, possessive quantifiers, or atomic groups. This tester uses JavaScript's engine specifically. For other engines, check engine-specific documentation.
Format, validate, and beautify JSON instantly. Syntax highlighting, error detection, minification.
Check text for plagiarism with n-gram fingerprinting. Color-coded results, detailed breakdown.
Format XML, SQL, CSS, HTML, and JavaScript instantly. Syntax highlighting, minification, line numbers.
Generate QR codes for URLs, WiFi, contacts, and email. Custom colors and sizes. PNG & SVG download.
Generate strong, secure passwords with entropy meter, batch generation, and pattern mode.
Search by image across Google Lens, TinEye, Yandex, and Bing. Upload, paste, or enter a URL.
Calculate monthly payments with amortization schedule, payment breakdown charts, and CSV export.
Calculate simple and compound interest with growth charts and year-by-year breakdowns.
Compare two texts with color-coded additions, deletions, and changes. Side-by-side view.