Regex Tester
Test regular expressions against sample text and see matches highlighted, for free.
How to use
- 1Enter a regular expression pattern.
- 2Choose flags like Global or Case-insensitive.
- 3Paste test text and see matches highlighted, with a details table.
Features
- Live match highlighting
- Match index and capture groups
- Standard JavaScript regex flags
Supported formats
Privacy
Your pattern and text are matched locally in your browser and are never sent to our server.
About this tool
The Regex Tester runs a JavaScript regular expression against a block of text, highlighting every match inline and listing each one's position and captured groups in a separate table — the fast feedback loop that makes building a pattern by trial and error actually practical, instead of swapping between an editor and a script to check each attempt. It uses the same regex engine that runs in every browser and in Node.js, so a pattern that works here will work in real code. New to regex syntax? Start with our beginner's guide to regular expressions.
Frequently asked questions
What regex flavor does this use?
This tool uses JavaScript's built-in regular expression engine, the same one used in browsers and Node.js.
What do the flags mean?
Global finds every match instead of just the first, Case-insensitive ignores letter case, Multiline changes how ^ and $ behave, and Dot matches newline makes . match line breaks too.
Is my text or pattern sent to a server?
No, matching happens entirely in your browser.
Why doesn't my pattern match anything without the Global flag?
Without Global, JavaScript's regex engine stops after the first match — everything after it in the text is never checked. Turn Global on to find every occurrence instead of just the first.
Related tools
JSON Formatter
Format and beautify JSON online with proper indentation, entirely in your browser.
JSON Validator
Validate JSON syntax and get clear error messages with line and column numbers.
JSON to CSV
Convert a JSON array of objects into a CSV file online for free.
CSV to JSON
Convert CSV data into a JSON array of objects online for free.