Regex Tester
Free online regex tester. Build and test regular expressions against sample text with live match highlighting, match details and common flags.
Without slashes — e.g. [a-z]+@[a-z]+
Matches (0)
Live preview
How to use Regex Tester
- 1
Type your regular expression in the pattern box (without slashes).
- 2
Enable the flags you need (global, case-insensitive, multiline…).
- 3
Paste sample text — every match is highlighted instantly.
- 4
Click the match list to jump between results, then copy the ready-to-use regex.
Key features
Live match highlighting in your sample text
Match list with start positions & captured groups
Flags: g, i, m, s, u
Clear syntax error messages
Copy the regex with flags for your code
Runs 100% locally
Pro tip
Test your regex on tricky input — empty strings, long lines and unicode — before shipping it. The highlighting shows exactly what will be captured.
Regex Tester — FAQ
g (global — match all, not just the first), i (case-insensitive), m (multiline — ^ and $ match line starts/ends) and s (dot-all — . matches newlines too).
Without the g (global) flag, JavaScript regex only returns the first match. Toggle the g flag in this tester to match everything.
Yes, it uses the JavaScript RegExp engine — the same flavor used in Node.js, browsers and most front-end frameworks.
Simple examples: emails use something like /[\w.+-]+@[\w-]+\.[\w.]+/ and URLs use /https?:\/\/[\w\-./?=&%]+/. Test and refine them here first.
Related tools
JSON Formatter & Validator
Format, minify and validate JSON in real time.
Developer ToolsBase64 Encoder & Decoder
Encode text to Base64 and decode it back instantly.
Developer ToolsURL Encoder & Decoder
Percent-encode or decode any URL or query string.
Developer ToolsHash Generator (SHA-1, SHA-256, SHA-512)
Compute SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text.
Developer ToolsUUID v4 Generator
Generate random UUID v4 identifiers in bulk, instantly.
Developer ToolsUnix Timestamp Converter
Convert Unix timestamps to readable dates and back.
Developer Tools