Explore
Open navigation menu
Developer Tools
Free tool

Regex Tester

Run a regular expression against sample text in your browser and inspect every match locally.

No account needed · Processed in your browser

Your data stays in your browser. Nothing is uploaded or saved.

JavaScript syntax; indexes count UTF-16 code units. Ctrl/Cmd + Enter runs the test. Execution stops after 1 second; results are limited to 1,000 matches and input to 1 MiB.

How to test a regular expression

The JavaScript engine checks your text in an isolated worker.

1

Enter a pattern

Write the expression without slash delimiters and choose flags.

2

Add test text

Paste a sample into the editor; Ctrl/Cmd + Enter runs the test.

3

Inspect matches

Check indexes, text and capture groups, or fix the reported error.

Understand the matches

Test JavaScript regular expressions against sample text locally. Matches and capture groups stay in your browser.

Pattern, flags and text

The JavaScript engine applies the pattern and flags to your sample. The g flag finds all matches; without it, the first match is returned.

Example: proper names

\b[A-Z][a-z]+\b with g finds Ada and Grace in “Ada met Grace”.

The engine limits execution time and match count.

Other developer tools

View all

Frequently asked questions

What does zero matches mean?

The pattern is valid, but it does not match the selected text and flags.

Is my text uploaded?

No. Testing runs locally in your browser.