Developer Tools
Regex Tester & Debugger
Write a regex pattern, paste your test string, and see all matches highlighted in real time. Capture groups are listed with their values, flags like g, i, m are toggleable, and match details show position and length.
Enter a pattern and test string to see matches
Regex testing runs entirely in your browser
Features
- Real-time highlighting of all matches in the test string
- Shows match index, position, and length for each match
- Lists all capture group values per match
- Toggleable flags: global, case-insensitive, multiline, dotAll
- Regex reference cheatsheet built in
- Displays total match count and no-match warning
How to use it
- Enter your regex pattern in the pattern field (without slashes).
- Select the flags you need (g, i, m).
- Paste your test string in the text area.
- Matches are highlighted instantly; capture groups appear in the table below.
Use cases
- Debugging regex patterns for form validation
- Testing log parsing patterns before adding to code
- Learning regex by seeing which parts match
- Building extract patterns for data cleaning pipelines
Limitations
- Invalid regex patterns are caught and reported without running the test.
- Very large input can be slower on older devices.
- This utility is designed for common snippets and local inspection, not as a full security or language-specific validator.
Related tools
Log Prettifier
Prettify JSON log output from Node.js, Python, or any structured logging framework. Colorised, formatted, and readable, browser-only.
Use toolFind and Replace
Find and replace text with plain text or regex patterns. Supports global replace, case-insensitive matching, and capture group references in the replacement.
Use toolDiff Checker
Compare two text blocks side-by-side and see additions, deletions, and unchanged lines highlighted. No upload. Your text stays in the browser.
Use toolJSON Formatter
Format and beautify JSON online. Paste minified or messy JSON and get clean, 2-space indented output with syntax validation, instant, in-browser, no upload.
Use toolJSON Validator
Validate JSON syntax online with exact error messages. Get line number, column, and a human-readable explanation for every JSON error, processed in your browser.
Use toolJSON Minifier
Minify JSON by removing all whitespace and line breaks. Paste pretty JSON, get compact JSON for APIs, payloads, and config files. Browser-only, free.
Use toolFrequently asked
Why do I get an 'Invalid regular expression' error?
Certain characters like (, ), [, ], {, }, +, *, ?, ^, $, |, and \ are special and must be escaped with a backslash if you want to match them literally.
Does it support lookaheads and lookbehinds?
Yes, modern JavaScript regex supports positive/negative lookaheads (?=...) and lookbehinds (?<=...) in all modern browsers.