Regex Tester
Test JavaScript regular expressions with live highlights, capture groups, replace, and split. Flag toggles and common presets included.
Uses JavaScript RegExp syntax. Without global (g), only the first match is listed. Replace mode uses $1, $2 for capture groups.
How it works
Set pattern and flags
Type a regex pattern or pick a preset (email, URL, IPv4). Toggle g/i/m/s/u/y flags or edit the flags field directly.
Paste test text
Paste or type sample text. In Match mode, hits highlight in yellow below the input. Capture groups and indexes appear in the results panel.
Replace, split, or export
Switch to Replace to preview substitutions ($1 for groups) or Split to break on the pattern. Copy or download the output.
Why test regex in the browser?
Regular expressions are powerful but easy to get wrong. A live tester lets you iterate on patterns against real sample data before dropping them into code, validators, or find-and-replace workflows.
Why use this tool
- Live match highlighting
- Capture groups and match indexes
- Match, Replace, and Split modes
- Flag toggles and regex presets
- Up to 200 matches listed
- Unlimited — no daily cap
Questions
What regex flavor is supported?
JavaScript RegExp as implemented in your browser — not PCRE or Python syntax.
Why only one match without the g flag?
Without global (g), RegExp stops after the first match. Enable g to find all occurrences.
How do capture groups work in Replace?
Use $1, $2, … for numbered groups and $<name> for named groups in the replacement string. $$ inserts a literal dollar sign.
Is highlighted output safe?
Yes. Highlights are React elements, not injected HTML from your regex.
Is my data sent to a server?
No. Testing runs entirely in this tab.
Is there a daily limit?
No. This tool has no daily cap.
If Easy24 helped, buy a coffee
Tools stay free in your browser. One-time thanks via Kreosus. Turkish cards work.
Similar Developer tools
See allJSON Formatter
Developer
Pretty-print, minify, validate, and sort JSON keys in the browser. Choose 2- or 4-space indent, import a file, download the result.
OpenMeta Tag Generator
Developer
Build SEO title, description, Open Graph, Twitter Card, and canonical tags with a live social preview. Runs in the browser.
OpenCSS Gradient Generator
Developer
Design linear and radial CSS gradients with up to three color stops. Live preview, presets, hex input, copy or download.
Open