Free online tool · ECMAScript engine · 100% client-side

Regex Tester & Debugger.

Write a regular expression, paste your test string, and see real-time match highlighting with capture group extraction. Uses the native browser JavaScript engine — results are identical to your Node.js or frontend code.

no pattern
Copied!
0 chars
MATCHES & GROUPS
Matches will appear here...

100% private — your test data never leaves this browser tab.

All evaluation runs inside the browser's native JavaScript engine. No server, no logs, no network transmissions. Pattern and test string are cached only to your own localStorage.

The Ultimate Real-Time Regular Expression Workspace

Zero-Latency Match Highlighting

Stop guessing if your pattern works. This free online regex editor evaluates your expression against your test string on every keystroke, color-coding full matches and individual capture groups directly within the text using inline <mark> overlays. You see exactly which characters are consumed and which groups are isolated — the fastest path to a correct regex.

JavaScript (ECMAScript) Regex Engine

This is a javascript regex match client side tool built directly on the browser's native V8 engine. Every pattern you validate here behaves identically in your React form handler, your Express route, or your Node.js data pipeline. Toggle g, i, m, and s flags with a single click — no config files, no surprises in production.

100% Local Browser Execution

When scrubbing API logs, cleaning database dumps, or extracting PII, security is non-negotiable. Unlike legacy regex tester online portals that route your strings through remote parsing servers, this suite executes entirely within your browser's local sandbox. Zero bytes of your test data leave your device at any point.

Engineered for Data Analysts and Developers

Interactive Capture Group Extraction

This regular expression debugger doesn't just highlight text — it uses String.prototype.matchAll() to isolate and extract every indexed and named capture group into a clean, readable JSON-style output. When you need to test regex capture groups, the extraction panel gives you a structured breakdown of every match object so you can verify your data parsing logic before writing a single line of production code.

Integrated Regex Cheat Sheet

No one memorises every token. Click Cheat Sheet to open the built-in reference panel covering character classes (\w, \d), quantifiers (*, +, ?), boundaries (^, $), and lookarounds — all without leaving the workspace.

Session Resilience & Auto-Save

Never lose a carefully crafted 50-character validation pattern to an accidental tab close. Your active regex, flags, and test string are cached into localStorage on every keystroke, allowing you to resume exactly where you left off.

How to Test and Debug Regular Expressions Online

Step 1: Write Your Pattern & Flags

Type your regular expression directly into the pattern bar between the /…/ delimiters. Activate the required flags by clicking the pill toggles — g for all matches, i for case-insensitive, m for multiline anchoring. The status indicator confirms whether the pattern is valid or reports the syntax error inline.

Step 2: Input Your Test String

Paste your raw data, log file, or text block into the test area. The engine parses the string against your pattern on every keystroke with zero delay — no submit button, no debounce lag. The highlight overlay updates in real-time beneath your cursor.

Step 3: Verify Matches & Groups

Full matches are highlighted directly in the test area. Scroll to the extraction panel below to see an indexed breakdown of every match object, including all capture group values and named groups. Use Copy JSON to export the full result array for use in unit tests or documentation.

Enterprise-Grade Privacy: Zero Data Leaves Your Browser

Backend developers and data scientists cannot risk pasting sensitive server logs or customer data into unsecured online Regex testers. This utility is engineered with a strict static architecture perfectly suited for edge deployments on Cloudflare Pages.

There are no backend servers parsing your strings, no database logs, and zero network transmissions. Every evaluation runs directly inside your device's native browser JavaScript engine — sandboxed, private, and verifiable via your browser's DevTools Network panel.

FAQ

Frequently Asked Questions

Technical answers about regular expressions, the ECMAScript engine, and this debugger.

What is a Regular Expression (Regex)?

A regular expression is a formal pattern language that describes a set of strings. At its core, a regex pattern is a sequence of characters where literals match themselves, metacharacters define structure (. matches any character, ^ anchors to line start, $ to line end), and quantifiers control repetition (* for zero-or-more, + for one-or-more, ? for zero-or-one, {n,m} for bounded ranges). The engine scans a target string left-to-right and attempts to match the pattern at each position. When it succeeds, it returns a match object containing the full match, any captured sub-expressions, and the match index. Developers use regular expressions for input validation, data extraction from structured text, log parsing, URL routing, search-and-replace transformations, and tokenizing source code — any task where the structure of text needs to be described programmatically rather than hardcoded character-by-character.

Which Regex engine does this tool use?

This tool runs directly on the ECMAScript (JavaScript) Regex engine built into your browser — the same V8 engine that powers Chrome and Node.js. This is a deliberate design choice for frontend and full-stack JavaScript developers: a pattern that validates in this tool will behave identically in your React form handler, your Express route definition, or your Node.js data pipeline. The ECMAScript regex flavor supports character classes, quantifiers, alternation, capturing and non-capturing groups, named capture groups (?<name>...), lookaheads (?=...) and (?!...), lookbehinds (?<=...) and (?<!...), and Unicode property escapes (p{Letter}). It does not support PCRE-specific features like atomic groups or possessive quantifiers, which is an important distinction if you are porting patterns from PHP, Python, or a .NET environment.

What do the Regex flags g, i, m, and s do?

Flags are single-character modifiers appended after the closing delimiter that change how the engine interprets the pattern. The global flag (g) instructs the engine to find all non-overlapping matches in the string rather than stopping after the first. The case-insensitive flag (i) makes the pattern match uppercase and lowercase letters interchangeably — [a-z] will also match [A-Z]. The multiline flag (m) changes the behavior of the ^ and $ anchors: without it, they match only the very start and end of the entire string; with it, they match the start and end of each individual line separated by newline characters. The dotAll flag (s), introduced in ES2018, makes the dot (.) metacharacter match newline characters ( , ) in addition to all other characters — without it, the dot skips newlines, which can cause patterns to fail silently on multi-line strings.

Is it safe to paste sensitive server logs or PII here?

Yes. This regex tester online is built on a strict static architecture with zero backend infrastructure. The JavaScript Regex engine that evaluates your pattern and test string runs entirely inside your own browser's local sandbox — the same isolated JavaScript context that executes any other script on the page. No string, character, or byte of your test data is transmitted over a network. There are no server-side API endpoints receiving your input, no request logs on a remote server, and no third-party analytics pipelines reading form contents. You can verify this directly: open your browser's DevTools Network panel, type in the test area, and confirm that no outbound POST or XHR requests are made. Input and pattern state are persisted only to your own device's localStorage.

What are Regex capture groups and how do I use them?

A capture group is a sub-expression enclosed in parentheses that causes the engine to record the text matched by that sub-expression as a separate result alongside the full match. When you call String.prototype.matchAll() in JavaScript, each result object contains index 0 (the full match) and indices 1, 2, 3… for each capture group in left-to-right order of their opening parenthesis. For example, the pattern (d{4})-(d{2})-(d{2}) applied to "2024-06-15" yields match[1]="2024", match[2]="06", match[3]="15". Named capture groups extend this by assigning string keys: (?<year>d{4})-(?<month>d{2})-(?<day>d{2}) makes the values accessible as match.groups.year, match.groups.month, match.groups.day — eliminating the fragility of positional indexing. Non-capturing groups (?:...) group sub-expressions for quantifier application or alternation without consuming a capture slot.

What is the difference between test(), match(), and matchAll()?

These three JavaScript methods expose the regex engine at different levels of verbosity. RegExp.prototype.test(string) is the lightest — it returns a boolean true/false and is the correct choice for pure validation scenarios like form field checks where you only need a pass/fail signal. String.prototype.match(regex) without the g flag returns a single match object (full match + groups + index), and with g returns a flat array of full match strings with no group data. String.prototype.matchAll(regex) requires the g flag and returns an iterator of complete match objects — each containing the full match, all captured groups, named groups, and the match index — making it the correct tool for extraction tasks where you need structured data from every occurrence of a pattern in a string. This tool uses matchAll() internally to power the capture group extraction panel.