DevTools Kit
Developer Utilities

Regex Tester

Regular expressions are powerful but notoriously easy to get subtly wrong — a pattern that matches your first test case might fail on an edge case you didn't think of. This free regex tester lets you try a pattern against sample text and see every match highlighted live as you type, along with a running match count and any captured groups, so you can iterate quickly instead of testing blindly in your actual code. It uses standard JavaScript regular expression syntax — the same engine that powers browsers and Node.js — making it a natural fit for testing patterns you'll use in JavaScript or TypeScript.

Processed entirely in your browser — your files are never uploaded anywhere.

//gi

How to use this tool

  1. Type a pattern (without the surrounding slashes).
  2. Toggle flags like global or ignore case as needed.
  3. Paste text to test against — matches highlight automatically.

Frequently asked questions

What regex flavor does this use?
Standard JavaScript regular expression syntax (the same engine used by browsers and Node.js) — slightly different in places from PCRE or Python's re module.
Why do I only see one match?
Enable the Global (g) flag to find every match in the text instead of stopping at the first one.
Can I test regex for languages other than JavaScript?
This tool uses JavaScript's regex engine specifically, which is similar to but not identical to PCRE (PHP) or Python's re module — most common patterns behave the same, but some advanced features differ.
How do I capture and view groups in my match?
Add parentheses around the part of your pattern you want to capture, e.g. (\d+) — matched groups appear listed below each match in the results.
Is my test text uploaded anywhere?
No — all matching happens locally in your browser using JavaScript's built-in RegExp engine. Nothing you type is sent to a server.