Find a tool

navigate Enter open

Use a task word when you do not know the exact name.

JavaScript Regex Tester

Local only

The JavaScript Regex Tester highlights matches and lists their indexes, numbered captures, and named groups. Expressions run in a local Web Worker with a 300 ms timeout.

Reviewed · Free · No account required

//
Test text0 chars
Match preview0 matches
Matches and capture groups
#MatchIndexCapture groups
No matches yet.
Uses the JavaScript RegExp engine. Tests stop after 300 ms or 1,000 matches.

What does the JavaScript Regex Tester check?

The KitLumi JavaScript Regex Tester compiles a pattern with the browser RegExp engine, scans the supplied text, and exposes each match and capture group. The tester does not emulate PCRE or server-side regex engines.

How do you test a regular expression?

  1. Enter the pattern without surrounding slash characters.
  2. Set JavaScript flags such as g, i, m, s, or u, then paste test text.
  3. Read highlighted matches and inspect the match index and capture groups in the table.

What do common JavaScript regex flags mean?

FlagMeaningUse it when
gGlobal searchYou need every match
iCase-insensitiveLetter case should not matter
mMultiline anchors^ and $ should match lines
sDot matches newlinesA match may span lines
uUnicode modeYou use Unicode-aware escapes or code points

What does a timeout mean?

A timeout means the browser did not finish the search within 300 ms. Nested quantifiers and ambiguous repeated groups are common causes. Reduce the input, make repetitions more specific, or replace a broad pattern with a parser.

Frequently asked questions about Regex Tester

Which regex engine does this tester use?

The Regex Tester uses the JavaScript RegExp engine in your browser. PCRE, Python, .NET, and Java expressions can behave differently.

Does the Regex Tester show capture groups?

Yes. The result table shows numbered captures and named groups for the first 100 displayed matches.

How does the tester handle slow regular expressions?

Each test runs in a Web Worker and is terminated after 300 milliseconds. The timeout reduces page freezes but is not a formal proof that a pattern is safe.

Why is a valid regex rejected?

The pattern may use syntax that JavaScript does not support, or a flag may not be available in the current browser. Check the target runtime before shipping the expression.

What changed?

Initial release · September 24, 2026

Added JavaScript pattern testing, flag validation, highlighted previews, capture-group output, a 1,000-match cap, and worker termination for slow patterns.

Who maintains this tool?

KL
KitLumi EngineeringKitLumi Engineering maintains browser behavior, privacy disclosures, examples, and automated tests.