Regex Tester
Test JavaScript regular expressions live, with highlighted matches, groups and replace.
How it works
- 1Enter a pattern and pick flags.
- 2Paste the text to test.
- 3See matches, groups and an optional replacement.
Features
- Matches highlighted in the text.
- Numbered and named capture groups.
- Replace preview with $1 and $<name>.
- Clear error messages for invalid patterns.
Frequently asked questions
Which regex flavour is this?
JavaScript (ECMAScript), as used in browsers and Node.js. Most syntax matches PCRE, but lookbehind and some escapes differ in older engines.
Why only 1000 matches?
To keep the page responsive; the count shows when there are more.
Is my data sent anywhere?
No. Everything runs in your browser; nothing is uploaded.
Related tools
JSON ValidatorCheck whether JSON is valid and see exactly where it breaks.URL DecoderDecode percent-encoded URLs and query strings back to readable text.Hash GeneratorGet MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or a file, with optional HMAC.Base64 DecoderDecode Base64 (standard or URL-safe) back to text.