Regex Tester

Test and debug JavaScript regular expressions in real-time. Includes highlighting, match details, and a quick reference cheatsheet.

Cheatsheet

Character Classes
. Any char \w Word char \d Digit \s Whitespace [abc] Set
Quantifiers
* 0+ + 1+ ? 0 or 1 {3} Exactly 3
Anchors
^ Start $ End \b Boundary
Groups
(...) Capture (?:) Non-cap
/ /
0 chars

Match Info

0
Matches Found
No matches found.
Time: 0ms

Test and Debug Regular Expressions Live

Type a regex pattern and your test string side by side — matches highlight instantly as you type, with support for flags, capture groups, and common regex flavors' syntax.

Tweak the pattern and watch the highlights update in real time. Everything runs locally in your browser, so your test data never leaves your device.

Live match highlighting

Every match lights up the moment you type, with capture groups broken out so you can see exactly what each part captured.

Flags and options

Toggle global, case-insensitive, and multiline flags to test how your pattern behaves under different settings.

Free and private

The tester runs entirely in your browser — patterns and test strings are evaluated locally with nothing uploaded.

How to use

  1. Type your regular expression into the pattern box.
  2. Paste or type your test text.
  3. Watch matches highlight live and adjust flags or the pattern as needed.

Frequently Asked Questions

What is a regular expression?

A regular expression (regex) is a pattern describing a set of strings — used for validating input, searching text, and extracting data in almost every programming language.

Which regex flavor does the tester use?

Patterns are evaluated with JavaScript's regex engine, which covers the syntax used in most modern languages.

What are capture groups?

Parentheses in a pattern create groups that capture the matched substring separately — the tester shows each group's match so you can verify them.

Is my test data uploaded anywhere?

No. Matching runs entirely in your browser — nothing you type leaves your device.

Is the tester free?

Yes, free with no signup.

Related Developer Tools

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools