Enter your regex pattern
Type or paste your regular expression into the pattern field, without the surrounding slashes, to start matching right away.
Test, debug, and validate your regular expressions in real-time. Extract capture groups, count matches, and check syntax errors instantly.
Developer Tool
100% Secure & Private
Processed locally in your browser. No data is sent to our servers.
How to use
Our workflow is designed to be straightforward, allowing you to complete your task in seconds.
Type or paste your regular expression into the pattern field, without the surrounding slashes, to start matching right away.
Toggle flags like global or ignore-case, then paste the sample text or code you want to run the pattern against.
Read the highlighted matches, match count, and captured groups that update live, then refine your pattern until it fits.
Colors matched strings visually in your target text.
Support for global, case-insensitive, and multiline toggles.
Extracts grouped matches into an easy-to-read list format.
Tests expressions locally to prevent regex denial of service.
Use cases
Verify regex patterns for form validation like email or phones.
Test custom capture group expressions before running scrapers.
Deconstruct match matches for editor search-replace rules.
Tool guide
A regular expression (regex or regexp) is a sequence of characters that forms a search pattern. When you search for data in text, you can use search patterns to describe what you are looking for. It can be a single character, or a more complicated pattern used for validation, string parsing, or search-and-replace tasks.
Flags are optional parameters added to a regex pattern to modify its search behavior. The most common flags are:
Type your regular expression inside the top text box and paste your code or text block in the test text area. Our matching engine updates automatically as you type, indicating matches, offsets, and matched group structures. It processes everything client-side, making it highly secure for test logs and raw code segments.
FAQ
This regex tester uses your browser's native JavaScript regular expression engine (V8 on Chrome/Edge, SpiderMonkey on Firefox, and JavaScriptCore on Safari). It supports standard JavaScript regex syntaxes.
If you write a regular expression susceptible to catastrophic backtracking (e.g. nested quantifiers like `(a+)+` against long mismatch strings), the browser tab might freeze. This is a characteristic of native regex execution. Ensure you write clean patterns.
By placing parts of your regex pattern in parentheses `( )`, you create capture groups. Our tester dynamically lists the characters captured by these parentheses for every matched string in the outputs.
No, your text is processed entirely in your browser's temporary memory. We do not store, track, or share any of your inputs.
You can switch on global, ignore-case, multiline, dotall, and unicode flags and instantly see how each one changes the matches in your test string.
From our blog
Read the full guide behind the Regex Tester Online and get the most out of it.
Related tools
Format, beautify, and validate JSON data instantly. Supports minification and custom spacing.
Open ToolDecode base64 encoded strings back to readable UTF-8 text, or encode plain text to base64.
Open ToolGenerate standard 128-bit MD5 hashes from any text input dynamically and securely in your browser.
Open ToolEncode text strings into URL-friendly format, or decode percent-encoded URLs back to plain text.
Open ToolConvert HTML markup into clean and readable Markdown syntax instantly. Drag & drop or paste tags.
Open ToolCompress raw CSS stylesheet code online. Remove unused whitespace, newlines, and comments to reduce file size.
Open Tool