Regex Tester

Developer Tools

Live regex with match highlights

FreePrivateInstant
//g
Flags:
Add a file · .txt .md .csv .json … · up to 2.00 MB
Full guide, 4 min readRegex from zero: ten patterns and the trap that freezes pagesRead the story behind this tool →
Embed this tool on your websiteFree
  1. Choose how tall the frame should be.
  2. Press Copy code.
  3. Paste it into your page, blog, WordPress or Notion HTML block.
Height

The tool runs inside your visitor's browser, nothing is uploaded, and a small "Powered by ToolCloak" line stays under it. The second line (script) is optional: it makes the frame fit the tool's height.

Similar tools you may like

History

All history →

Regex Tester — at a glance

Write a regular expression and see live which parts of your text match it.

Pattern + text
Pattern: \d+
Text: Order 123 and 45
Match
Matches
Match 1: 123
Match 2: 45

How to use it — step by step

Great for learning regex and for checking patterns before putting them in code.

1

Write the pattern

Type your regular expression without the surrounding slashes.

2

Pick flags

g = all matches, i = ignore case, m = multi-line, s = dot matches new line.

3

Add test text

Paste the text you want to search.

4

See matches

Matches are highlighted with their position and capture groups.

Pro tips

Small things that make the result better.

✦\d means a digit, \w a letter/number, \s a space.
✦Add the g flag to find every match, not just the first.
✦Use ( ) to capture parts of a match (groups).

Quick facts

4 flagsg, i, m and s
Livehighlighting as you type
Groupscapture groups shown
Errorsinvalid patterns flagged

Frequently Asked Questions

What does the g flag do?+

It finds all matches in the text instead of stopping at the first.

What does i do?+

It makes the match ignore upper/lower case differences.

Which regex flavour is used?+

The JavaScript regular expression engine of your browser.

Is my data safe?+

Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.

More Free Tools