Skip to tool

Regex Tester

//g
About this tool

Test regular expressions against text with real-time match highlighting, group capture, and replacement preview.

Privacy and details

Your files never leave your device.

Fast browser processing with no account required.

Optimized for desktop and mobile with accessible controls.

How to use
  1. Type your regular expression pattern in the top field.
  2. Enable or disable flags (g, i, m, s, u) using the checkboxes.
  3. Paste your test string below to see matches highlighted in yellow.
  4. The match list shows each match, its index, length, and any capture groups.
  5. Enter replacement text to preview how .replace() would rewrite the input.
  6. Use the quick reference panel to insert common patterns with one click.
Why use this tool

Test patterns against sample text in one view. Matches, capture groups, and replacement previews update as you edit.