Regex tester

Test regular expressions with instant highlighting.

Evaluate patterns, inspect matches, and copy reusable snippets without leaving the browser. Use it alongside the color converter when building CSS utilities that rely on regex validations.

Highlights matches liveSupports regex flagsProvides ready-made snippets

Pattern & flags

Patterns update in real-time as you type.

Snippets

Test text

Matches are highlighted inline.

Highlights

Matched segments are wrapped for quick review.

Matches: 2
Hello from DevTools Today. Contact Jane Doe or John Smith for access.

Matches

Capturing groups are listed for each match.

  • Match 1 at 27: Contact Jane

    • Group 1: Contact
    • Group 2: Jane
  • Match 2 at 47: John Smith

    • Group 1: John
    • Group 2: Smith

Frequently asked questions

Quick answers for developers landing here from search.

How do I test a regex?

Enter your pattern and optional flags, then paste or type sample text. Matches highlight automatically, and matches list out each capturing group.

What do the snippets do?

Pick a snippet to preload a pattern, flags, and sample text for common use cases like email or URL matching. You can tweak them as needed.

Is the processing done locally?

Yes. All regex evaluation happens in your browser, so you can test production data without sending it to a server.