Regex Tester
Test JavaScript regular expressions with highlighted matches and capture groups. Your input stays in your browser.
- Free, no sign-up
- Text stays in your browser
- Local processing / no upload
Limit: 500,000 character units per input. Oversized pastes are rejected. Drafts stay in this page and are not saved.
Step by step
How to use Regex Tester
Step 1: Paste sample text into Input and a bare pattern without slash delimiters into Pattern. Enter flags separately; g collects all matches.
Step 2: Select Test regex. Inspect highlights, zero-based ranges and numbered or named captures. A two-second evaluation limit stops expensive patterns.
Step 3: Revise the pattern if it times out. Copy or download match details, checking any truncation notice; results follow JavaScript regex rules.
Example to try
Load example with the default named-letter pattern and g flag. A12 and B34 match; each has a letter capture and a digit capture, with the letter also available as a named group.
Test a JavaScript pattern with explicit flags
Enter a bare expression without surrounding slash delimiters and choose flags in the separate field. The default example captures the letter and number parts of order identifiers. Add g to inspect all matches rather than only the first. The results show zero-based UTF-16 start and end positions, full-match text, numbered captures and named captures. Unmatched optional captures are labeled explicitly.
Understand flags and browser support
The flag help explains global matching, ignore case, multiline anchors, dot-all, Unicode, sticky matching, capture indices and Unicode sets. Available syntax depends on the browser JavaScript engine; invalid, duplicated or incompatible flags produce a syntax error. Unicode and Unicode-set modes cannot be combined. This is a JavaScript tester and does not promise the same behavior as Python, PHP or a database regex engine.
Output limits and local processing
At most 1,000 matches are displayed, and match or capture text in the report is abbreviated after 500 characters. Highlights use the corresponding input ranges, while zero-width matches appear in the detail list. Pattern text is limited to 10,000 character units. Pasted text and expressions are processed locally; the worker evaluates only the regular expression and never executes them as JavaScript source.
Inputs and results are held only in this page's memory. Developer inputs accept up to 500,000 character units each. Oversized pastes are rejected while preserving the previous input. Generated output is limited to 5,000,000 character units. No sign-up is needed. Copy and download actions are explicit; the tool does not upload your drafts or save them for a later visit.