Skip to content

Regex Tester for JavaScript

Test regular expressions with real-time match highlighting.

  • No uploads
  • No account
  • No ads
  • No watermarks
  • Free forever

Network check starts when you add a file or change something in the tool

Blocks every fetch, XHR and beacon request this page makes and switches Google Analytics off, on tool pages, for this session.

Requests this page makes are counted from then on; page-load requests are left out.

How this works / check it yourself

From the moment you add a file or change something in the tool, this badge lists the requests this page makes. It reads the browser's own list of requests (Resource Timing), which shows a request once it finishes, and watches every fetch, XHR and beacon call. Downloads, such as this site's PDF and OCR engines or an AI model from Hugging Face, are listed apart from requests that carry data out.

This page cannot see requests made inside background workers (such as the PDF engine pdf.js and Tesseract OCR), WebSocket and EventSource connections, form submissions, link pings or the site's service worker, so they are not counted here, and offline mode cannot block them. A request is listed once it finishes. Your browser's Network tab shows everything.

Offline mode blocks the fetch, XHR and beacon calls this page makes. A part of the site that set up its connection before the page finished loading, such as sign-in, is not blocked; if it sends anything, the badge counts it as sent.

  1. Open your browser's developer tools (F12, or Cmd+Option+I on a Mac) and choose the Network tab.
  2. Add your file, run the tool and look for any request that uploads it. Requests made by workers are listed there too.
  3. For the strongest test, turn Wi-Fi off once the page has loaded and run the tool again: tools that need no download still work.
All Developer Tools

About Regex Tester

Type a regular expression and test text to see every match highlighted as you type. The tester uses your browser's JavaScript regex engine and lists each match with its index and capture groups. Toggle the g, i, m, s and u flags. Testing runs in your browser, so your pattern and text are not uploaded.

How to use Regex Tester

  1. Type your pattern without the surrounding slashes.
  2. Turn on the flags you need and paste your test text.
  3. Read the highlighted matches and the table of groups.

Limits: JavaScript (ECMAScript) syntax only, not PCRE, Python or .NET. All matches are listed even with g off. It stops at 500 matches, and the table shows the first 100. No replace mode.

Frequently asked questions

Which regex flavor does this tester use?

JavaScript. Patterns run in your browser's own RegExp engine, so results match what JavaScript code does in that browser. Features JavaScript lacks, such as possessive quantifiers from PCRE, show a pattern error.

Do I need to add slashes around the pattern?

No. Type only the pattern, such as \d{3}-\d{4}. Set flags with the buttons beside it instead of writing /pattern/gi.

What do the g, i, m, s and u flags do?

i ignores letter case. m makes ^ and $ match at each line. s lets the dot match line breaks. u turns on full Unicode mode. g finds all matches; this tester always lists every match, so turning g off does not change the list.

How do I see capture groups?

Wrap part of the pattern in parentheses. The Matches and groups table shows each match, its index in the text and the value of every group. Named groups appear by number.

Is there a limit on matches?

Yes. The tester stops at 500 matches. Up to 500 are highlighted in the text, and the table lists the first 100.

Is my test text uploaded?

No. Matching runs in your browser. Your pattern and text are not sent to a server.