Skip to content
ConvertPassConvertPass home

Developer

Regex tester

Try a JavaScript regex locally with safe highlighting.

This tool processes files and text locally in your browser. Your content is not uploaded or stored by this site.

ConvertPass #local #tools

What this tool does

The tester compiles a RegExp with the flags you provide and lists matches, groups, and named groups. Highlighting is done by splitting text into React elements, never by assigning innerHTML.

How to use it

  1. Enter a pattern and flags.
  2. Paste a test string.
  3. Read match count and group captures.

Supported input

  • Pattern up to 400 characters, test string up to 100 KB

Output

  • JSON of matches plus a highlighted view

Privacy

This tool processes files and text locally in your browser. Your content is not uploaded or stored by this site.

ConvertPass does not include your input in analytics, URLs, or error reports. Encoding: UTF-8. Limit: 100 KB test string (100.0 KB).

Limitations

  • This is the JavaScript regex engine, not PCRE, Python, or Go RE2.
  • Catastrophic backtracking can still freeze the tab. Keep patterns small.
  • Stopped after 5,000 matches.

Example

Input
pattern: #(\w+)  text: ConvertPass #local #tools
Output
{
  "matchCount": 2,
  "matches": [
    { "value": "#local" },
    { "value": "#tools" }
  ]
}

Troubleshooting

Invalid flags
Use a subset of g i m s u y. The tester adds g when listing all matches.

FAQ

Why not PCRE?

The browser ships one regex engine. Pretending to be PCRE would mislead anyone pasting lookbehind from PHP.

Is highlighting XSS-safe?

Yes. Match text is rendered as text nodes. A test string containing <script> cannot execute here.

Can I test against a file?

Paste the file contents if it is under 100 KB. Larger logs should be sampled first.

What about possessive quantifiers?

JavaScript does not support them. Rewrite the pattern.

Related tools

Related guides

Related formats

Last reviewed 16 August 2026. Report a problem. Reports do not include your input.