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

Secure JSON Formatter & Type Generator - Local Type Gen

Secure JSON formatter: format, validate, and fix JSON locally. Beautify/minify, highlight errors, generate TypeScript or Zod, convert to XMLโ€”private. Try now.

Free JSONPath Tester & Evaluator | Local Real-Time Queries

Free JSONPath tester and evaluator for API JSON. Extract matching nodes in real time, inspect paths, and copy JSON results while parsing stays local in your browser.

JSON to CSV Converter - Local Spreadsheet Export

Convert JSON objects or arrays to CSV locally in your browser. Flatten fields, preview the result, then copy or download CSV without uploading data.

CSV to JSON Converter - Local Real-Time Parser

Convert CSV text or files to JSON arrays locally in your browser. Supports headers, comma/semicolon/tab delimiters, drag-and-drop files, copy, and download with no uploads.

JSON Diff Checker - Local Semantic Compare

Compare two JSON documents locally in your browser. Sort object keys for a semantic diff, ignore key-order noise, and mark added, removed, and modified fields without uploads.

JSON Minifier & Compressor

Minify JSON into one line, remove indentation and line breaks, and compare original size, minified size, saved bytes, and saved percentage.

JSON to TypeScript Converter - Generate Interfaces Locally

Free online JSON to TypeScript converter. Instantly generate TypeScript interfaces and types from your JSON payloads. 100% private, client-side code generation.

YAML to JSON Converter - Secure Client-side Parser

Convert YAML to formatted JSON locally in your browser. This developer tool supports live conversion, multi-document YAML, line-aware errors, copy, and JSON download without storing data.

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.