Regex Tester - Free Online Regular Expression Testing Tool

Regular Expression

/
/
g
Status: Valid
Matches: 0

Test String

Match Results

Common Patterns

Email
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Matches email addresses
Phone
(\+\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}
Matches phone numbers
URL
https?://...
Matches HTTP/HTTPS URLs
IPv4
^(?:(?:25[0-5]|...)\.){3}....$
Matches IPv4 addresses
Date
\d{4}-\d{2}-\d{2}|...
Matches common date formats
Credit Card
\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}
Matches credit card numbers
Hex Color
#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})
Matches hex color codes
HTML Tag
<\/?[a-z][\s\S]*>
Matches HTML tags

Quick Reference

Characters

. Any character
\d Digit (0-9)
\w Word character
\s Whitespace

Quantifiers

* Zero or more
+ One or more
? Zero or one
{n,m} Between n and m

Anchors

^ Start of string
$ End of string
\b Word boundary

Groups

() Capturing group
(?:) Non-capturing
[abc] Character set
[^abc] Negated set

How to Use

  1. Enter your regular expression in the regex input field
  2. Select appropriate flags (g, i, m, s) as needed
  3. Enter test string to match against your regex
  4. View highlighted matches and detailed results below
  5. Use common patterns for quick testing or reference guide for syntax help

Regex Tester

Test and validate regular expressions with real-time matching, syntax highlighting, and common patterns library. Free online regex tester for developers.

Developer Tools

How people use it

This browser-based tool is designed to be fast, easy to use, and private by default. Open the tool, adjust the settings, and get results instantly without creating an account or sending files to a server.

Everything runs locally in the browser whenever possible, which reduces friction for users and makes the page more useful as a direct-answer landing page from search.

Common topics

The following topics are closely related to this tool and help explain what it is for:

Quick answers

How do I use this regex tester?

Enter a pattern in the /.../ box, choose flags (g/i/m/s), then paste a test string to see real-time matches and highlighting.

What do the flags g, i, m, s mean?

g = global (find all matches), i = ignore case, m = multiline (^/$ match per line), s = dotAll (. matches newlines).

Why does it say the regex is invalid?

It uses JavaScript regular expressions. If your pattern has a syntax error or uses unsupported features, the status will show invalid with an error.

Regex Tester Documentation & Guide

Test and validate regular expressions with real-time matching, syntax highlighting, and common regex patterns library. Easy and free online regex tester for developers.

Overview

Regex Tester is an easy and free online tool that runs in your browser.

What you can do with this tool

Key capabilities (based on the actual UI and code):

  • Runs in your browser (local-first)

Read the full guide forRegex Tester