DEVELOPER UTILITIES

Regex Tester & Debugger

Test JavaScript regular expressions, highlight matches, inspect capture groups, and preview replacements locally with worker timeout protection.

How to use this tool

Evaluated locally in an isolated browser worker. Your pattern, test text, and matches are not uploaded.

Pattern & test text

Enter the pattern without / delimiters. Empty patterns are supported when you choose Run regex.

JavaScript flags

0 / 50,000 characters · Index positions use UTF-16 code units.

Examples are practical patterns, not guaranteed universal validators.

Regex cheat sheet
.
Any character except line breaks (unless s)
\d / \w / \s
Digit / word character / whitespace
[] / [^]
Character class / negated class
() / (?<name>...)
Capture group / named group
^ / $
Start / end; line boundaries with m
* / + / ?
Zero or more / one or more / optional
{n,m}
Repeat between n and m times
(?=...) / (?!...)
Positive / negative lookahead
(?<=...) / (?<!...)
Lookbehind in supporting browsers
amp; / $1 /
lt;name> / $
Replacement: full match / capture / named capture / literal $

Matches & debugging

Enter a pattern and text, load an example, or choose Run regex.

Understand JavaScript patterns

Highlight matches, inspect capture groups, and preview replacements. Useful for extracting log values, debugging patterns, or cleaning whitespace.

Practical example

Load the date example to inspect named year, month, and day groups. Preview

lt;day>/
lt;month>/
lt;year> in replacement mode.

Limits and privacy

JavaScript semantics and UTF-16 indices apply. Patterns are limited to 2,000 characters, text to 50,000, replacement text to 10,000, and replacement output to 200,000. Live evaluation pauses above 20,000 characters. Workers have a one-second deadline and are terminated on timeout or cancellation. At most 500 matches and bounded capture data are shown. Replacement is unavailable for partial results. Examples are practical patterns, not universal validators; this tool does not claim perfect ReDoS detection.

Everything is processed locally. Input, credentials, decoded content, and matches never enter analytics, logs, browser storage, or page URLs. Clear the tool or leave the page to release its resources.

Related tools

Related tools