Regex Tester
Test regular expressions against any string instantly in your browser. See all matches, groups, and indices in real time without any server round-trips
CODE TEXT
/ /
Preview
Matches
No matches found.
Tip: enter a regex pattern and flags, then type in the test area to see matches highlighted in real time.
Runs 100% Locally in Your Browser
This tool processes your data entirely on your device. Nothing is uploaded, stored, or sent to any server.
No Uploads
Privacy First
Secure by Default
Related Tools
List to Comma Separated Paste a list (one item per line) and convert it into a single string with your chosen separator
JSON Beautifier Paste your minified or messy JSON and get clean, properly indented output for easier reading, debugging, and development
JSON Minify Convert formatted or messy JSON into inline JSON instantly. Minify JSON by removing unnecessary whitespace and generate a compact single-line string
CSS Minifier Paste your CSS and get a compact, minified version instantly. Remove comments, whitespace, and redundant characters to reduce file size and improve page load performance
Frequently Asked Questions
What is a regular expression (regex)?
A regular expression is a pattern of characters used to search, match, and manipulate text according to defined rules.
How to test a regex pattern against a string online?
Enter your pattern in the regex field and your test string in the input — all matches are highlighted in real time.
What is the difference between regex and wildcard patterns?
Wildcards (* and ?) are simple shell-style patterns; regex is a full formal language that supports character classes, quantifiers, groups, and lookaheads.
What are regex capture groups used for?
Groups — defined with ( ) — let you isolate and extract specific parts of a match, such as a date's year, month, and day separately.
What do regex flags like g, i, and m do?
g finds all matches (not just the first); i makes the match case-insensitive; m makes ^ and $ match line boundaries instead of the whole string.
What is the difference between greedy and lazy regex matching?
Greedy quantifiers (like *) match as much as possible; lazy quantifiers (like *?) match as little as possible — add ? after a quantifier to make it lazy.
Is my regex pattern or test text sent to a server?
No. All matching runs in your browser using the built-in JavaScript RegExp engine — nothing is transmitted.