Local StudioDEVELOPER TOOLS

Regex Tester

Test JavaScript patterns and inspect the offsets and captures for each match.

  • Free
  • Works Offline
  • No Uploads
Works with:
  • Microsoft Edge
  • Google Chrome
  • Mozilla Firefox
  • Safari
Regex Tester showing the b ab sample, match offsets and an unset optional capture.
The sample highlights the difference between an unset optional capture and matched text.

How to Test a Regular Expression

  1. Open the HTML, review Security Check, then select Continue.
  2. Type or paste test text, select a local UTF-8 file, or select Open Sample.
  3. Enter a raw JavaScript pattern without slash wrappers. Choose the flags you want. Global matching is selected by default.
  4. Select Test Pattern. To stop an active test, select Cancel. Editing the pattern, flags or text clears the previous result.
  5. Review offsets and select a match number to inspect captures. Select Download JSON for the retained full values.

Regex Tester Features

  • Use a raw JavaScript pattern and choose flags. Case-sensitive global matching is selected by default.
  • Browse matches with zero-based UTF-16 offsets and inspect numbered and named captures.
  • Cancel evaluation or download the matches and captures as JSON.

Formats and Compatibility

InputType or paste test text, or open one UTF-8 text file up to 4 MiB. A test supports up to 2,097,152 UTF-16 code units of text.
OutputMatch text, zero-based start and exclusive end offsets, and the capture state for each group. Enable d for group offsets. JSON uses null for an unset capture and an empty string for a participating empty capture.
BrowserA modern browser with local file support.
ScopeRaw JavaScript regular expressions with up to 4,096 UTF-16 code units, on text up to 2,097,152 code units. Matching uses a cancellable worker with a two-second deadline.
Operating Systems
  • Windows
  • macOS
  • Linux
  • ChromeOS

Local Processing Without Uploads

A free browser-based regex tester with no upload. Run the regex tester without uploading files or use the extracted HTML offline.

Select Open Sample to see the workflow with the included example.

JavaScript Pattern and Flag Support

Enter a pattern without slash wrappers. The browser's ECMAScript engine implements the flags. Unicode modes u and v are alternatives. Each test has a two-second worker budget. The result memory budget may limit the number of matches retained.

Review Matches and Capture States

Open Sample to see two matches over b ab. Inspect the first match to find an unset optional group, then inspect the second to see that group match a. Empty matches have equal start and end offsets.

Frequently Asked Questions

Can I use the regex tester offline?

Yes. Use the regex tester download, extract the ZIP and open RegexTester.html.

How does the local regex tester handle Unicode?

The regex tester in browser mode uses JavaScript's u or v flag for Unicode matching. Offsets are counted in UTF-16 code units in every mode.

Is this a free regex tester tool?

Yes. You can use the regex tester online or open the downloaded HTML. The regex tester browser tool processes the text on your device.

What happens if a regex takes too long?

The two-second worker deadline stops the run. Edit the pattern or shorten the text, then try again. A stopped run has no result.

How are input line endings handled?

Text files retain their decoded line endings until edited. The editor uses LF after editing. The displayed code-unit count follows the text used for matching.

Does this tool work offline on Windows, macOS, Linux, and ChromeOS?

Yes. Local Studio tools run offline on Windows, macOS, Linux, and ChromeOS. Download the tool ZIP, extract it, and open the included HTML file in a supported browser. Your files are processed on your device without uploads.

Which browsers can I use with this offline tool?

Use a current version of Google Chrome, Microsoft Edge, Mozilla Firefox, or Safari where that browser is available for your operating system. Chrome is built into ChromeOS, and Safari is available on macOS.