Regular expression tester
Type a pattern and instantly see which parts of the text match.
Everything runs in your browser. Nothing you type or paste is sent to a server.
How to use the regular expression tester
- 1
Type your regular expression.
- 2
Turn on the flags you need (g, i, m, s, u).
- 3
Paste the test text and review matches and groups.
About this tool
It uses your browser's JavaScript regex engine, the same as Node.js and your web apps, including named groups and lookbehind.
Patterns run in a separate worker with a time limit, so a catastrophically backtracking pattern can't freeze the page.
Frequently asked questions
Does it work for PHP or Python?
Most patterns behave the same, but engines differ in syntax. This tool uses JavaScript syntax.
What is a named group?
A group like (?<year>\d{4}) that you can reuse by name in the replacement with $<year>.
Related tools
- Images
Favicon Generator
Create favicon.ico and every icon your site needs from an image or letters.
- Images
Image to Base64
Turn an image into Base64 or a data URI for HTML, CSS or JSON.
- Images
Base64 to Image
Decode Base64 or a data URI and download the image.
- Images
Image Color Picker
Get the HEX, RGB or HSL code of any point in an image.