Regex Tester

Test a JavaScript pattern against sample text. View matched text and capture groups.

Up to 200,000 input characters. Output limit: 2,000,000 characters. Pattern limit: 5,000 characters. Processing limit: 2 seconds.

Download result

Your input is processed in your browser and is not uploaded to ToolPixels. This tool does not save your input.

How to use it

  1. Paste your input, or load the example.
  2. Choose the options that match your task.
  3. Select Test regex, then review the result.
  4. Copy the result or download regex-tester.json.

JavaScript regex behavior

Flags d, g, i, m, s, u, v and y are accepted when supported by your browser. Without g or y, only the first match is returned. Match indexes count UTF-16 code units, not visible characters. Unmatched capture groups are null. Results stop at 1,000 matches. Processing runs in a separate worker and is stopped after two seconds to keep pathological patterns from freezing the page.

Related developer tools