Regex Tester
Test JavaScript regular expressions, highlight matches, inspect capture groups, and preview replacements.
Enter a pattern and text, then click Test.
Results
Matches:
0
Highlighted text (non-overlapping matches)
Matches & groups
| Index | Match | Groups |
|---|
Replacement output
Formulas
Tool description
This regex tester uses the JavaScript RegExp engine (the same one your browser uses). It helps you quickly verify
patterns, flags, and capture groups before shipping code.
How to use
- Enter a regex pattern and choose flags.
- Paste your test text.
- Click Test to see matches, groups, and replacement output.
- Copy matches as JSON for debugging or documentation.
Why it’s useful
- Debug complex patterns quickly.
- Inspect capture groups and named groups clearly.
- Preview replacement strings before using them in code.
Use cases & interpretation
- Validation: test input constraints (emails, IDs, slugs).
- Parsing: extract groups from logs or CSV-like text.
- Refactoring: preview safe find/replace transformations.
FAQs
No. This uses the JavaScript RegExp engine. Most syntax overlaps, but there are important differences across languages.
Sticky matches must start exactly at the current
lastIndex. It’s useful for tokenizers, but can surprise people in “search” use cases.
Other tools in this category
Base64 Converter
Encode/decode Base64 safely (Unicode-friendly) with copy and reset.
iFrame Generator New
Generate a safe, copy-ready HTML iframe snippet with optional sandboxing and preview.
JSON Formatter New
Format, minify, and optionally sort JSON keys with clear errors and copy buttons.
Number Base Converter New
Convert integers between bases (binary, octal, decimal, hexadecimal, base36) with BigInt support.
Unix Timestamp Converter New
Convert Unix timestamps (seconds/milliseconds) to dates and back with UTC/local output.
URL Encoder/Decoder New
Encode or decode URLs and components with options for query-string plus spacing.
UUID Generator New
Generate UUID version 4 values in bulk with copy and formatting options.
Lorem Ipsum Generator New
Generate Lorem Ipsum placeholder text by words, sentences, or paragraphs with copy and reset.
Encode/decode Base64 safely (Unicode-friendly) with copy and reset.
iFrame Generator New
Generate a safe, copy-ready HTML iframe snippet with optional sandboxing and preview.
JSON Formatter New
Format, minify, and optionally sort JSON keys with clear errors and copy buttons.
Number Base Converter New
Convert integers between bases (binary, octal, decimal, hexadecimal, base36) with BigInt support.
Unix Timestamp Converter New
Convert Unix timestamps (seconds/milliseconds) to dates and back with UTC/local output.
URL Encoder/Decoder New
Encode or decode URLs and components with options for query-string plus spacing.
UUID Generator New
Generate UUID version 4 values in bulk with copy and formatting options.
Lorem Ipsum Generator New
Generate Lorem Ipsum placeholder text by words, sentences, or paragraphs with copy and reset.
Encode/decode Base64 safely (Unicode-friendly) with copy and reset.
iFrame Generator New
Generate a safe, copy-ready HTML iframe snippet with optional sandboxing and preview.
JSON Formatter New
Format, minify, and optionally sort JSON keys with clear errors and copy buttons.
Number Base Converter New
Convert integers between bases (binary, octal, decimal, hexadecimal, base36) with BigInt support.
Unix Timestamp Converter New
Convert Unix timestamps (seconds/milliseconds) to dates and back with UTC/local output.
URL Encoder/Decoder New
Encode or decode URLs and components with options for query-string plus spacing.
UUID Generator New
Generate UUID version 4 values in bulk with copy and formatting options.
Lorem Ipsum Generator New
Generate Lorem Ipsum placeholder text by words, sentences, or paragraphs with copy and reset.