Regex tester for Next.js & Supabase text. In your browser.

Test JavaScript patterns with highlights, named and numbered groups, replacement text and a short cheat sheet. No uploads — free, no sign-up.

Loading the tool…

JavaScript engine only. Browser flag support varies; timeout and display caps are explicit. Regex testing does not prove production ReDoS safety.

How to use

  1. Enter a JavaScript pattern without slash delimiters, flags, a test string and optional replacement.
  2. Choose Test regex. An isolated worker finds matches and performs replacement; expensive patterns are stopped after 750 ms.
  3. Inspect highlighted matches, capture groups and UTF-16 indices. Copy matches or the replaced string locally.

Reference documentation

Frequently asked questions

Is this free, and does anything leave my browser?

Free, no sign-up. Inputs and outputs stay in your browser, with no processing endpoint or upload. Copy and download are local. Usage events contain only a fixed tool name and action, never your data.

Is this the same syntax as PostgreSQL regex?

No. This runs your browser's JavaScript RegExp engine. PostgreSQL expressions, PCRE and other engines differ. Test a database expression in your own database before relying on it.

Why do I see only one match?

Without the g flag, JavaScript exec and replace return or replace the first match. Add g for all nonoverlapping matches. Sticky y requires a match at the current cursor rather than searching forward.

How do replacement groups work?

Use $1 for the first numbered capture and $<name> for a named capture. $& inserts the full match and $$ inserts a dollar sign. These use native JavaScript string replacement rules, not a function callback.

What prevents a slow pattern from freezing the page?

Matching and replacement run in a worker that is terminated after 750 ms. Patterns are limited to 2 KB, test strings to 100 KB, replacements to 10 KB and outputs to 1 MB. This is a local testing limit, not a proof a pattern is safe in production.

What about empty matches and Unicode?

Empty matches use a visible vertical marker and advance correctly over Unicode code points with u or v flags. Offsets count UTF-16 units. Capture indices use the d flag automatically. Unsupported or conflicting flags produce an error; the match display caps at 1,000.

Related tools

All free tools

Read this page as Markdown