Regex Tester - Live JavaScript Regex Debugger

Test JavaScript regex patterns locally with live highlights, flags, match counts, and capture groups. Debug sample text in your browser with no uploads.

Click for theater mode

Matches

2 matches
[email protected]\[email protected]\nnot-an-email

Capture Groups

#IndexMatchGroups
10[email protected]none
221[email protected]none

How to Use

  1. Type or choose a regular expression.
  2. Paste the sample text you want to test.
  3. Toggle flags such as g, i, or m.
  4. Review highlighted matches, match count, and capture groups.
  5. Copy matches or keep refining the pattern.

Note: The first version uses JavaScript RegExp, which differs from PCRE, Python, and other regex flavors.

Core Features

  • Live JavaScript Regex Testing: Type a regex pattern and sample text to see matches instantly.
  • Flag Toggles: Switch common g, i, m, s, and u flags quickly.
  • Capture Group Inspector: Review capture groups for each match to debug parsing logic.
  • Local Text Debugging: Logs, payloads, identifiers, and snippets stay in your browser.
  • Useful Presets: Start with common patterns for email, URL, UUID, whitespace, and log levels.

Related Tools

FIRE Calculator 2026 (Inflation Adjusted) | Retirement Gap Simulator

The 2026 FIRE Calculator (Inflation Adjusted). Simulate real purchasing power, analyze retirement savings gaps, and generate a visual wealth roadmap. One-click CSV export for your Excel or Notion finance dashboard. 100% Private, client-side calculation.

Position Size Calculator - Risk-Based Trade Sizing

Calculate trade position size from account balance, risk %, entry, and stop loss. Runs locally in your browser with no uploads, so you can compare risk scenarios before you trade.

Compound Interest Calculator | Free APY & Investment Chart

Calculate compound interest from principal, recurring contributions, APY, and time. Visualize principal, interest, and final balance with a local interactive chart.

Online Loan & Mortgage Calculator - Instant Amortization Schedule

Use this Loan Calculator / Mortgage Calculator to estimate monthly payment, total interest, and an amortization schedule locally. Enter amount, rate, and term to calculate now with instant charts.

Online Investment & ROI Calculator - Compound Interest Visualizer

Use this Investment Calculator / ROI Calculator to estimate starting capital, monthly contributions, annual return, and inflation-adjusted results locally. Calculate projected returns with an instant compound interest chart, ROI, and yearly schedule.

APR to APY Calculator - Convert Nominal & Effective Rates

Use this APR to APY Calculator to convert between APR and APY locally. Enter a rate, choose compounding frequency, and see the effective interest rate, spread, and frequency comparison instantly.

Profit Margin Calculator - Margin vs Markup Converter

Use this Profit Margin Calculator to calculate gross profit, Markup, Margin, and selling price locally. Enter cost and price, or cost and target margin, then calculate your margins instantly.

CPM & CPC Calculator - Ad Spend and CTR Online Tool

Use this CPM Calculator and CPC Calculator to estimate ad spend, impressions, clicks, CPM, CPC, and CTR locally. Enter budget and target costs to plan campaign scenarios instantly.

Calculation Logic

The tool uses the browser's JavaScript RegExp engine locally:

  • The pattern is compiled into a JavaScript regular expression.
  • Flags change case sensitivity, multiline behavior, global matching, and more.
  • Capture groups expose specific parts inside each match.
  • Input length is capped to reduce the risk of slow patterns freezing the page.

FAQ

Is my sample text uploaded?

No. Matching runs locally in your browser, and sample text is not uploaded to a server.

Which regex flavor does this use?

The first version uses JavaScript RegExp. It does not emulate PCRE, Python, RE2, or other engines.

How do I see capture groups?

After a match is found, capture groups are listed per match so you can inspect each parenthesized submatch.

Why does my regex work elsewhere but not here?

Regex syntax varies by language and engine. This tester follows JavaScript regex behavior.

Can a regex freeze the page?

Very complex patterns can be expensive. The tool limits input length and reports errors or boundaries in the UI.