Developer Tools · Free browser tool

Regex Tester

Test regex matches, groups, and replacements with g, i, m, s, or u flags. A 300 ms worker timeout protects pages; patterns run in a disposable local worker.

See every match, safely

Live matching, capture groups and replacement preview run in a short-lived local Web Worker. Patterns are never evaluated as JavaScript.

Local processing
Flags
57 / 20,000
Match highlights
Waiting for a pattern…
0 characters

Use `$1`, `$2`, `$&` or `$<name>` in the replacement field. Supported flags: g, i, m, s and u.

Patterns are limited to 500 characters, test text to 20,000 characters and replacement previews to 200,000 characters. Workers are terminated after 300 ms to keep a pathological expression from freezing the page.

Processed on your device. Tool inputs are not uploaded or saved by QUICKKIT.

SPECIFICATIONS & EXAMPLES

Regex Tester: flags, limits, and hang protection

Matching runs in a disposable Web Worker that is terminated after 300 ms, so a catastrophic-backtracking pattern cannot freeze the page. Patterns are passed only to the browser’s RegExp constructor — no eval, no Function.

Regex Tester specifications

  • Input limits: Pattern up to 500 characters, test text up to 20,000 characters, replacement up to 10,000 characters, and at most 500 matches.
  • Flags: g (global), i (ignore case), m (multiline), s (dotAll), u (Unicode).
  • Match inspection: Highlighted matches, match indexes, and capture groups (numbered and named) for every match.
  • Replacements: Live preview following String.replace conventions: $$, $&, $1–$99, and $<name>.
  • Hang protection: A 300 ms worker timeout terminates slow patterns and reports an error instead of freezing the tab.
  • Processing: Everything runs locally in the browser.

Regex Tester examples

  • Email extraction: Pattern [\w.]+@[\w.]+\.\w+ with flag g over a paragraph → Every email address highlighted with its index and full match
  • Named-group swap: Pattern (?<first>\w+) (?<last>\w+), replacement $<last>, $<first> → Each “First Last” pair rewritten as “Last, First” in the live preview
  • Catastrophic pattern: A nested-quantifier pattern over a long non-matching string → A timeout error after 300 ms instead of a frozen page

Patterns and test text stay in the browser. The worker is disposable and terminated after each run.

A quick walkthrough

How to test regex patterns and replacements

  1. Enter a regular expression, choose flags and type or paste test text.
  2. Review highlighted matches, match indexes and capture groups. Add replacement text to see a live replacement preview.
  3. Copy or download the replacement result. Invalid patterns and expressions that exceed the worker time limit produce an error message.
  4. Try a small representative sample first, then increase the sample up to the 20,000-character limit; timeouts indicate the pattern needs a safer structure.
Good to know

Regex tester questions, answered

Can a pattern execute JavaScript?

No. The pattern is passed only to the browser's RegExp constructor in a dedicated worker. No eval or Function constructor is used.

Can a slow pattern freeze the page?

The matcher runs in a disposable worker that is terminated after a short time limit. Pattern and sample lengths are also capped.

What flags are supported?

The tester supports g, i, m, s and u. Replacement strings follow the browser's String.replace conventions, including $1 and $&lt;name&gt;.

Does the tester support every JavaScript regex flag?

It supports g, i, m, s, and u. Flags outside that set, including sticky and indices, are not offered in this tester.

COMPARISON

Regex Tester: how it compares, and when to use something else

Regex Tester compared against a cli tool or a hosted playground — what runs locally in this workspace, what rules are enforced, and where another kind of tool is the better fit.

This tool on QUICKKIT compared with A CLI tool or a hosted playground

Verified behaviour of this tool against the alternative approach a searcher is usually weighing it against.
What mattersThis tool on QUICKKITA CLI tool or a hosted playground
Where your data is processedIn this browser tab. Your input is read, processed and exported on your own device, no copy is created on a QUICKKIT server, and closing the page clears it. There is therefore no retained file, no server-side queue and no deletion window to take on trust.Uploaded to the provider's infrastructure, processed there and returned. Retention and deletion are policy statements that cannot be verified from outside, however sincere they are.
Cost, signup and quotasFree in the browser with no account, no trial gate and no watermark; limits come from tab memory and documented scope rather than a paid quota.Often gated behind account registration, usage quotas or paid team seats once you export, save history or run recurring workflows.
What happens with a catastrophic patternA 300 ms worker timeout terminates a slow pattern and reports an error instead of freezing the tab — the practical defence against ReDoS while you experiment.A hosted tester that hangs, or that silently truncates the input, gives you a wrong answer about your own pattern.
Match inspection and replacementFlags g, i, m, s and u, highlighted matches with indexes, and numbered and named capture groups per match. Live replacement preview follows String.replace conventions exactly: $$, $&, $1–$99 and $<name>.Named-group replacement syntax is frequently wrong or missing, and flavour differences are rarely labelled.
FlavourJavaScript, and unambiguously so — the result is what your browser code will actually do. Patterns relying on PCRE-only constructs such as lookbehind variants, atomic groups or conditionals are not silently approximated.PCRE/Python-flavoured testers are the better choice when the target runtime is not JavaScript, and using a JavaScript tester for a server-side pattern is a real source of bugs.
Real limitsPattern up to 500 characters, test text up to 20,000 characters, replacement up to 10,000 characters, and at most 500 matches shown.A CLI over your real corpus has no such caps and is the right tool for validating a pattern against production data.

When something else is the better choice

  • This belongs in CI, a git hook, an editor task or a build script. The CLI packages themselves. A browser tab is the wrong place for a pipeline: it cannot see your repository, cannot run unattended, and is bounded by the character and byte caps on this page.
  • You need to work across a project rather than one pasted document — a module graph, a directory of files, or a schema set. The CLI, or a bundler analyser for source maps, tree shaking and bundle size. These tools operate on what you paste and have no view of a project.
  • You need to process more data than the character or byte cap on this page, or at a speed that matters. The equivalent command-line tool. Reading a large input in chunks in a tab works, but it is bounded by browser memory and by the cap stated on the page.

Use Regex Tester on QUICKKIT when you want a fast, browser-based workflow without creating an account or handing inputs to a third-party queue; choose a cli tool or a hosted playground when this belongs in ci, a git hook, an editor task or a build script..