Test a regex against your own text, live, with a cheat-sheet close at hand

Metre2 Regex Tester

Type a pattern and watch every match highlighted instantly in your test text - no copy-paste-refresh loop, no browser tab full of ads. A searchable cheat-sheet of common patterns sits one click away, and everything runs entirely on your device.

Metre2 Regex Tester's Tester tab showing a pattern input with flag chips on the left, and a live highlight canvas with two matched email addresses picked out in colour on the right, above a match results table

Live highlight canvas

Every match is picked out in your test text as you type the pattern - a large monospace canvas with matches in rotating colours, no "run" button to click.

Full match detail table

Every match's exact text, character range, numbered capture groups and named capture groups are laid out in a table underneath the highlight canvas.

Searchable pattern cheat-sheet

Anchors, character classes, quantifiers, groups, lookaround and a set of ready-made common patterns (email, URL, date, phone, hex colour) - search it or click "Use this pattern" to load one straight into the tester.

Replacement preview

Toggle "Preview String.replace()" and enter a replacement string - with $1, $2... group references or $<name> named-group references - to see the exact result before using it anywhere else.

All six JS regex flags

Toggle g, i, m, s, u and y as chips with an inline description of what each one does - no need to remember which letter means what.

Save, search and reload patterns

Name a pattern and its test text and keep it in a dedicated Saved Patterns tab - search by name or pattern, rename, delete, or reload any saved pattern at any time.

Clear, in-context error messages

An invalid pattern or an unknown/duplicated flag shows the exact JS SyntaxError message right under the pattern field - no guessing what went wrong.

Nothing ever leaves your device

Every pattern, test string and saved pattern stays on this device - no upload, no account, no telemetry. Export saved patterns as JSON whenever you want a backup.

How it compares to a browser-based regex tester

Most people reach for a browser tab full of ads, or paste sensitive data into a site of unknown provenance. Here's how a dedicated desktop regex tester compares.

Feature Regex Tester A random web regex tool Your editor's built-in find
Pricing model Free Usually free, ad-supported Bundled with the editor
Pattern or text ever leaves your device Never Sent to a server
Built-in searchable cheat-sheet Usually a separate page
Replacement preview with group references Not always Rarely shows groups
Save and search a pattern library

General comparison as of August 2026. Not affiliated with any browser extension, web tool or code editor vendor.

Regex Tester, in practice

Frequently asked questions

Does my pattern or test text ever get uploaded anywhere?

No. Regex compiling, matching and highlighting all happen inside the app using the browser engine's own JS RegExp - there are no network calls anywhere in this app.

Which regex flavour does it use?

Native JavaScript RegExp - the same engine that runs in every modern browser and in Node.js - including named capture groups, lookaround, and the g/i/m/s/u/y flags.

What if I don't remember the regex syntax for something?

The built-in Cheat Sheet tab covers anchors, character classes, quantifiers, groups, lookaround and a set of ready-made common patterns (email, URL, date, phone, hex colour and more) - click "Use this pattern" to load any of them straight into the tester.

Can I preview a find-and-replace before using it elsewhere?

Yes. Tick "Preview String.replace()" and enter a replacement string (using $1, $2... for numbered groups or $<name> for named groups) to see the exact result your pattern would produce.

Can I save patterns for later?

Yes. Name a pattern and it's saved to the Saved Patterns tab, which lives in local storage on your device - search, rename, delete, or reload any saved pattern (with its test text) at any time. You can also export every saved pattern as JSON and import it back later.

Does it cost anything?

No - Regex Tester is a free app with no trial period or in-app purchases.

Ready to try Regex Tester?