How to Test a Regular Expression (Regex) Online

Regular expressions are powerful but easy to get subtly wrong. Testing a pattern against real sample text — and seeing exactly what matches — is the fastest way to get it right. Kitolity’s regex tester runs entirely in your browser.

The tool

Regex Tester

Open Regex Tester

Step by step

  1. Open the Regex TesterGo to the Regex Tester in your browser.
  2. Enter your patternType your regular expression and any flags (e.g. g, i, m).
  3. Paste sample textAdd the text you want to match against.
  4. See the matchesWatch matches highlight live as you refine the pattern.

Common regex gotchas

Remember that ., *, +, ?, (), [], {}, ^, $, and \ are special — escape them with a backslash to match them literally. Use the i flag for case-insensitive matching and g to find all matches, not just the first. Anchors ^ and $ match start and end of a line (or string).

Why test against real text?

A pattern that looks right often over- or under-matches on real data. Testing against representative samples — including the edge cases you expect to fail — catches those problems before the regex ships in your code.

Frequently asked questions

Is my text uploaded?

No — matching runs entirely in your browser, so your pattern and text stay on your device.

Does it highlight matches?

Yes — matches update live as you edit the pattern.

Is it free?

Yes, completely free with no sign-up.

All guides