Skip to content

Regex Tester

Developer Tools ·
·

Test and debug regular expressions with live highlighting

Get your regex right before it hits production

Regex is one of those things where you’re either 100% confident in your pattern or you have no idea if it’ll match what you think it will. There’s rarely an in-between.

Type your pattern, paste your test string, and matches light up immediately. You see how many matches there are, their exact positions, and every captured group. Toggle flags on and off, global, case-insensitive, multiline, dotAll, unicode, and watch the results change in real time.

Way faster than editing your code, running it, checking the output, tweaking, running again. Just iterate in the browser until the pattern works.

The flags, quickly

g (global): find all matches, not just the first. i (case-insensitive): /hello/i matches “Hello”, “HELLO”, “hello”. m (multiline): ^ and $ match start/end of each line, not just the whole string. s (dotAll): . matches newlines too. Without this, . matches everything except \n. u (unicode): proper handling of characters outside the BMP (emojis, etc.).

Each flag has its own toggle button. Combine them however you need.

Patterns you’ll keep coming back for

Email: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ URL: https?:\/\/[^\s]+ IP address: \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b Date (YYYY-MM-DD): \d{4}-\d{2}-\d{2} HTML tags: <[^>]+> Hex colors: #[0-9a-fA-F]{3,8}

Paste any of these into the pattern field and test them against your data.

Captured groups

The match details table shows every captured group with its value and group number. If your pattern has (parenthesized) sub-expressions, you’ll see exactly what each group matched. Essential for debugging complex patterns with multiple captures.

One thing to keep in mind

This uses the browser’s native JavaScript RegExp engine. Patterns that work here will work in any JavaScript environment. But Python, Java, PCRE, and other regex flavors have slightly different features and syntax, named groups, lookbehinds, and possessive quantifiers may behave differently across engines.

FAQ

Which regex engine?

JavaScript’s native RegExp, the browser’s built-in engine. Compatible with Node.js and all browser JavaScript.

Does it show capture groups?

Yes, every captured group for each match, with values and group numbers.

Multiline testing?

Enable the m flag and ^/$ will match at line boundaries within your test string.

Privacy?

All client-side, your patterns and test data stay in your browser.

regex tester regular-expression pattern developer

Related Tools

More in Developer Tools

Nano ID Generator

Generate compact, URL-friendly unique IDs with customizable length and alphabet

Neumorphism Generator

Build soft-UI neumorphic CSS with a live preview. Drag the shape to move the light source, tune distance and blur, and copy the box-shadow.

Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any base 2-36

Nginx Config Generator

Build an nginx server block from a form. server_name, SSL, reverse proxy, PHP-FPM, gzip, body limits, custom locations. Copy or download the .conf.

Paste Share

Share text or code via a short link. Set an expiry, add syntax, or burn it after one read.

Progress Bar Creator

Build a CSS progress bar with sliders for value, height, and radius, plus color pickers and striped or animated stripe toggles. Copy the HTML and CSS instantly.

SQL Formatter

Format and beautify SQL queries with proper indentation

Screen Resolution Checker

Instantly see your screen resolution, browser viewport, pixel ratio, and color depth. Resize the window and the viewport numbers update in real time.

SQL Query Builder

Visually build a SELECT query with columns, WHERE filters, JOIN, ORDER BY, and LIMIT. Strings get quoted for you. Copy ready.

SVG Blob Generator

Generate smooth, random organic blob shapes as SVG. Tune the complexity and randomness, pick a color, regenerate until you like it, then copy or download.

SVG Wave Generator

Build smooth wavy SVG dividers and section backgrounds, adjustable height, frequency, color. Copy or download the SVG.

TOML to JSON Converter

Convert TOML configuration files to clean, formatted JSON output

View all 81Developer Tools