Free Regex Tester Online
You can stare at a regular expression for ten minutes and still not be sure why it does not match. Our free online Regex Tester replaces that frustrating guess-and-check loop with a tight feedback cycle: type the pattern, type the test text, and every match lights up in real time as you edit either side. Capture groups are colour-coded, and a side panel lists each match with its index, position, and captured group values so you can see exactly what your pattern is doing — and exactly what it is missing. Backreferences, named groups, lookaheads, lookbehinds, character classes, quantifiers (greedy, lazy, possessive where supported), and the full flag set (`g` for global, `i` for case-insensitive, `m` for multi-line, `s` for dotall, `u` for Unicode, `y` for sticky) all work as they would in a real JavaScript runtime — because behind the scenes the tester evaluates your pattern with the browser's native `RegExp` engine, which is the same engine your code will use in production. That fidelity matters: you do not want to debug a regex against a different flavour and then watch it fail when you paste it into your actual codebase. Real-world scenarios where this saves time: validating an email or phone format and discovering it falsely rejects valid edge cases; writing a Markdown link extractor and checking it against a paragraph with both inline and reference-style links; building a log parser that needs to capture timestamps, severity levels, and message bodies into separate groups; pulling structured data out of HTML when a real parser is overkill; testing a search-and-replace operation before running it across thousands of files; and learning regex as a beginner by watching what each character class actually matches in plain English. The match panel shows the captured groups inline, so you can confirm that group 1 really is the username and group 2 really is the domain before pasting the pattern into your code. Quick craft note: regex flavours differ. JavaScript, PCRE (used by PHP, Perl, and many command-line tools), Python, .NET, and POSIX all have small but real differences. This tester uses the JavaScript flavour, which is what you want when targeting browser code, Node.js, TypeScript, React, or any modern web stack. For server-side or shell work, double-check the equivalent syntax in your target language's docs. If you need to format the surrounding code your regex will live inside, the [Code Beautifier](/tools/code-beautifier) handles JavaScript and other languages, and for testing the data your regex will run against, the [JSON Formatter](/tools/json-formatter) helps when that data is structured. Everything happens in your browser — no signup, no patterns logged, no daily limit.
How to Use Regex Tester
Enter Your Pattern
Type the regex pattern into the pattern box. You do not need to wrap it in slashes — the flags are set separately.
Pick Flags
Toggle the flag checkboxes — `g` for all matches, `i` for case-insensitive, `m` for multi-line, `s` for dotall, `u` for Unicode.
Paste Test Text
Drop your sample input into the test text area. Matches are highlighted as you type, and the match panel updates in real time.
Inspect Capture Groups
The match panel lists each match with its position and the captured groups. Hover over a highlight to see the group breakdown inline.
Features
Native JavaScript Engine
Uses the browser's built-in RegExp implementation — exactly the same engine that your production JavaScript will use.
Real-Time Highlighting
Matches and capture groups are colour-coded and updated on every keystroke. No "test" button to press.
Full Flag Set
g, i, m, s, u, and y are all supported. Toggle them independently and watch the match results change.
Capture Group Inspector
See each match with its position, the full match string, and the value of every numbered and named capture group.
Lookaheads and Lookbehinds
Both positive and negative lookaheads (`(?=...)`, `(?!...)`) and lookbehinds (`(?<=...)`, `(?<!...)`) work as in modern JavaScript.
Benefits of Using Regex Tester
Completely Free
Use Regex Tester without any cost, limits, or hidden fees. No premium plans needed.
No Installation
Works directly in your browser. No software downloads or plugins required.
100% Private
Your files and data are processed locally. Nothing is uploaded to external servers.
Works Everywhere
Compatible with Chrome, Firefox, Safari, Edge on desktop, tablet, and mobile.
No Sign-Up
Start using the tool immediately. No account creation or email verification.
Always Available
Access this tool 24/7 from anywhere in the world, on any device.
Frequently Asked Questions
Complete Your Developer Tools Workflow
These free tools work seamlessly with Regex Tester to handle every step of your workflow.