FREE
Loading…
Test and debug regular expressions. Highlights all matches and shows captured groups.
FREE
Loading…
Regex Tester is a free online tool for testing, debugging, and validating regular expressions against sample text in real time. Enter a pattern and see all matches highlighted inline, with match count and captured group values displayed clearly.
Regular expressions are powerful but notoriously difficult to write correctly. A missing escape character, wrong quantifier, or unintended greedy match can silently match the wrong content — or fail to match at all. This tool lets you iteratively build and test your pattern against a real input string before using it in production code, saving debugging time that would otherwise be spent running scripts repeatedly.
The tester supports the full set of JavaScript regex flags: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line starts/ends), and s (dotAll — dot matches newlines). Flags can be toggled individually. Captured groups (parentheses) are extracted and shown alongside each match so you can verify that your capture expressions are working correctly.
All regex processing happens entirely in the browser using the native JavaScript RegExp engine — the same engine used in Node.js, Chrome, and V8-based runtimes. There is no server call, no data transmission, and no account required. Sensitive strings (API responses, database content, log lines) can be safely tested without leaving your machine.
Enter your regex pattern and select flags (g, i, m, s). The tool constructs a JavaScript RegExp object and applies matchAll() against your test string. All matches are highlighted in the result area. Captured groups for each match are extracted and listed. If the pattern is invalid, the error message is shown immediately so you can fix the syntax.
Enter your regex pattern
Type or paste a regular expression into the pattern field. Flags such as /g, /i, /m are selectable separately.
Enter test string
Type or paste the text you want to match against in the test string area.
View matches
All matches are highlighted in real time in the test string as you type the pattern.
Inspect groups
Capture groups are listed below the test string with their match values and index positions.
Use the cheatsheet
The regex cheatsheet panel lists common patterns and syntax for quick reference.
Pattern Validation
Test email, phone, or URL validation patterns against real input samples before using them in code.
Log File Parsing
Develop and refine patterns for extracting specific fields from server log lines or error messages.
Find and Replace Logic
Verify a replacement pattern works correctly on sample text before applying it to a large file.
Form Input Validation
Build and test regex constraints for form fields like credit card numbers, ZIP codes, or usernames.
Data Scraping Rules
Iterate on extraction patterns for web scraping scripts to ensure they capture the right tokens.
Learning Regular Expressions
Use the match highlighting and group display to interactively learn how regex flags and syntax work.
Real-Time Match Highlighting
Matches are highlighted in yellow directly in the test string as you type, giving instant visual feedback.
Captured Group Display
All capturing groups are listed with their match index and value so you can verify extraction logic.
Flag Selection
Toggle g, i, m, and s flags individually so you can test each combination without editing the pattern.
Match Count Badge
Shows the total number of matches at a glance, making it easy to confirm your pattern is inclusive or exclusive enough.
Clear Error Reporting
Invalid regex patterns show a descriptive error message immediately rather than silently producing wrong results.
Privacy by Design
All pattern testing runs in the browser so sensitive log data and proprietary text never leaves your machine.
Also Try
Also Known As
Binary To Decimal
Convert between binary, decimal, hex and octal number systems
Color Converter
Convert colors between HEX, RGB, and HSL formats
Convert Binary
Convert binary numbers to text and text to binary
Convert Timestamp
Convert Unix epoch timestamp to standard date format and back
Count Words
Count words, characters, sentences and paragraphs in text
Convert Datetime
Convert datetime between different formats and timezones
Trusted Worldwide
iLoveDocsTools is used by students, professionals, and businesses across the United States, Canada, United Kingdom, Australia, India, and more than 100 other countries. All tools are browser-based and process files privately — your files never leave your device. Free to use, with Pro plans for unlimited access.
All processing happens directly in your browser. Your documents are never sent to any server — complete privacy guaranteed for users in the USA, Canada, UK, and worldwide.
Every tool on iLoveDocsTools is free to use. Need more? Upgrade to Pro for unlimited usage, priority access, and no daily limits. Trusted by students, freelancers, and teams across North America and Europe.
Whether you are on a Mac, Windows PC, iPhone, or Android in New York, Toronto, London, or Sydney — our tools work instantly in any modern browser.
Looking for free PDF tools in the USA? Free document converters in Canada? Online PDF editors in the UK or Australia? iLoveDocsTools offers 70+ free tools — merge PDF, split PDF, compress PDF, convert Word to PDF, Excel to PDF, JPG to PDF, and many more — all free, all instant, all private. No watermarks. No file size limits. Just free tools that work.