Skip to content
Local Only Dev Tools
Text & Code Private · runs in your browser

Regex Tester

Test regular expressions live against sample text with flags, matches and capture groups. Use this Regex Tester free, directly in your browser. It runs entirely on your device, so your data stays private, and it works on desktop and mobile without any signup.

Regex Tester

Runs locally

0 characters

How do I test a regular expression?

Enter a pattern and flags, paste test text, and see every match with its position and capture groups. Matching happens live in your browser as you type.

Read Regex Basics for Developers

Common workflows

Regex → String Escape

Test a pattern, then escape it for code.

Features

  • Live matching as you type
  • Flags: g, i, m, s, u, y
  • Match list with indices
  • Capture group details

How to use Regex Tester

  1. 1 Enter a regular expression (without the surrounding slashes).
  2. 2 Toggle flags such as g for global or i for case-insensitive.
  3. 3 Paste test text and inspect matches and capture groups instantly.

Examples

Email-ish

a@b.com
foo@bar.io

Pattern: [\w.]+@[\w.]+\.\w+

Find numbers

abc 123 def 45

Pattern: \d+ with the g flag

Common errors and fixes

The output is empty.

Check that the input is valid and not empty.

The result looks unexpected.

Review the format notes below the input and try again.

Frequently asked questions

Is Regex Tester free?

Yes. Regex Tester is free with no signup, no installation and no usage limits.

Is my data uploaded?

No. Everything runs locally in your browser — your data never leaves your device.

Does it work on mobile?

Yes. The layout adapts to small screens and works in any modern browser.

Why does my pattern with ^ only match the first line?

Add the m flag so ^ and $ match the start and end of each line.

What do capture groups show?

Named and numbered groups are listed for each match, so you can check exactly what was captured.