Digital ToolPad.

Runs 100% in your browser

Your data never leaves your device. zero uploads.

JavaScript Regex Tester

Test JavaScript regular expressions against sample text with visible match results.

2 matches2 groups1 ms
161 chars

Uses your browser's JavaScript regex engine. Matching runs in a background thread, so a runaway pattern is stopped instead of freezing the page. Need a pattern from a plain English description? Try Regex AI, also offline

Matches with their position and capture groups
#MatchPosition
1
user
ada.lovelace8-20
domain
example.com21-32
8-32
2
user
support+billing80-95
domain
mail.example.co.uk96-114
80-114

Working with JavaScript Regex Tester

Check a pattern in the browser's JavaScript regex engine before moving it into your code. Flags affect matching behavior, so keep them visible while comparing examples. Include edge cases that should not match as well as expected successes.

How to use JavaScript Regex Tester

  1. Enter a regular expression and select its flags.
  2. Paste representative matching and non-matching text.
  3. Inspect highlighted matches, groups, and replacement behavior when needed.

JavaScript Regex Tester example

Test ^cat$ with and without the multiline flag against a three-line sample to inspect how anchors behave.

What to expect from the result

Results follow the current browser's JavaScript regex support. Other engines, including PCRE and Python, can interpret patterns differently.

JavaScript Regex Tester questions

How do I use JavaScript Regex Tester?

Enter a regular expression and select its flags. Paste representative matching and non-matching text. Inspect highlighted matches, groups, and replacement behavior when needed.

What should I check in the result?

Results follow the current browser's JavaScript regex support. Other engines, including PCRE and Python, can interpret patterns differently.

100% private: your data never leaves your browser

No registration, no tracking of your content, no server uploads. Don't just take our word for it:

  • No server, no uploads

    Your files and text are processed entirely on your device. Nothing is ever sent to us.

  • Works offline

    Once loaded, this tool keeps working with your Wi-Fi turned off. Try it.

  • Verify it yourself

    Open your browser's DevTools → Network tab. You'll see zero requests carrying your data.

Explore more tools

More utilities for your next task.

Browse all tools