Overview / Developer & Code / RegEx Tester & Live Evaluator
Developer & Code 100% In-Browser & Offline

RegEx Tester & Live Evaluator

Test JavaScript regular expressions in your browser. Matches are highlighted as you type, with flag checkboxes and a match counter.

Paste or type your input; results appear instantly and errors are shown below the input.

Your files and input never leave your browser – nothing is uploaded.

RegEx configuration

Match preview

0 matches

A regex tester that runs the engine you ship

You wrote a pattern for order numbers like ORD-2024-00417. It works on your first three log lines. On the fourth, it also grabs a number inside a longer string. This regex tester marks every match while you type, so you see the extra mark when you paste all four lines. It uses the RegExp class of your own browser, so a match here is a match in your JavaScript or TypeScript code.

Five steps, four fields

  1. Type the pattern into the first field. The two slashes around it are decoration, so do not type them. The page starts with an email pattern and a short sample text.
  2. Tick the flags you need, or type them into the flags field.
  3. Paste your test text. A log excerpt, one CSV line or a block of HTML all work.
  4. Read the match preview. Matches get a blue mark, and the counter above the preview shows how many were found.
  5. Press "Large view" if the text is long.

Flags and checkboxes rewrite each other

The checkboxes cover g, i, m and s. Typing in the flags field updates the boxes. Ticking a box does the opposite: it rebuilds the field from the four boxes, so a typed u disappears. Switching g off does not cut the result to the first match, because the preview always searches the whole text.

Anchors are the classic test. Does ^ match only at the start of the text, or at the start of each line? Toggle m and watch the marks move.

Four things this tester does not do

  • It lists no capture groups.
  • There is no replace function.
  • Python syntax such as (?P<name>…) or (?i) raises an error, because only JavaScript syntax works.
  • Lookbehind depends on the version of your browser.

Why one pattern can freeze the tab

The tool has no timeout. A pattern with nested quantifiers, like (a+)+b, can need exponential time on text that almost matches. If the tab hangs, close it and simplify the pattern. When a pattern is invalid, the preview shows the message of the browser in red, for example an unclosed group, and the counter reads "Error". An empty pattern shows your text unchanged and a count of 0.

Nothing leaves the page

Pattern and text stay in the browser. Matching runs locally on every keystroke. The tool sends no request, uses no clipboard and downloads nothing.

Frequently asked questions (FAQ)

Type the pattern into the pattern field and paste your text below it. Matches are highlighted at once, and the flags g, i, m and s are checkboxes.