Regex Tester

Test regular expressions against any sample text. Live match highlighting, capture-group inspection, all JavaScript flags (g, i, m, s, u, y). Great for debugging patterns before you ship them.

Features

  • Live match highlighting in the test text
  • All match results listed with capture groups
  • Toggle flags: g, i, m, s, u, y
  • Replace mode: try replacement strings with $1/$2 references
  • Catches malformed patterns with a clear error

How to regex tester

  1. Type a pattern — Without leading/trailing slashes — just the pattern body.
  2. Toggle flags — g for global, i for case-insensitive, etc.
  3. Paste test text — Matches highlight live. Click any match for details.

Frequently asked questions

Is it safe to use the Regex Tester online?
Yes — and ours is safer than most. Many free online tools quietly upload your files to their servers to do the work. We don't. Everything happens inside your browser on your own device, so your files never reach the internet. There's no upload step, no server copy, and no way for us (or anyone else) to see what you're working on.
Are my files uploaded to a server?
No. There's no server-side processing here. The whole tool is a tiny app that runs in your browser — we don't even have a server that could receive your files. You can confirm this by opening your browser's network tab while you use the tool: nothing leaves your device.
Do I need to sign up or pay?
No. There's no account, no email collection, no credit card. The tool is free to use as much as you want, on as many files as you want. We're supported by a few unobtrusive ads on the page — not by your data.
Does it support PCRE-only features (lookbehinds, named groups)?
It uses JavaScript's RegExp. ES2018+ features (lookbehinds, named groups, Unicode property classes) work in modern browsers.
What about regex injection if I paste untrusted patterns?
We catch infinite-loop / catastrophic-backtracking patterns with a 200ms timeout per match attempt — they fail safely.