Regex tester — test a regular expression against real text, live.
Type a pattern and flags, paste some text, and see every match highlighted with its capture groups as you type. JavaScript flavour, with a replace preview.
About this free Regex tester.
This free regex tester runs JavaScript regular expressions in
your browser and highlights every match as you type. Enter a
pattern and flags, paste the text you want to search, and see
each match with its capture groups and named groups listed
underneath. A replace box previews the result of
String.replace with $1-style
references, so you can check a substitution before it goes into
code.
It uses the same engine as your browser, which makes it the
right tool for validating patterns destined for Node.js,
front-end code, or anything else that speaks ECMAScript regex,
including lookbehind, named groups and the s,
u, y and d flags.
Free · No signup · Runs in your browser · Last updated
- Live highlightingEvery match is highlighted in the test text as you edit the pattern.
- Capture groupsNumbered and named groups listed per match.
- All JavaScript flagsg, i, m, s, u, y and d are supported.
- Replace previewSee the output of a replacement with $1, $<name> and $& references.
- Instant errorsInvalid patterns show the engine’s error message immediately.
- PrivatePattern and text never leave your browser.
How to test a regular expression in four steps.
Type a pattern
Enter the expression without surrounding slashes, for example (\w+)@(\w+)\.com.
Set the flags
Add g to find every match, i to ignore case, m for multiline anchors, and any others you need.
Paste the test text
Matches are highlighted immediately and listed with their capture groups.
Preview a replacement
Optionally enter a replacement string such as $1 at $2 to see what String.replace would produce.
Regex tester questions, answered.
Which regex flavour is this?
JavaScript’s, as implemented by your browser — so lookbehind, named groups and the s and u flags work in any modern browser, but PCRE-only features like possessive quantifiers don’t.
What do the flags do?
g finds all matches, i ignores case, m makes ^ and $ match line boundaries, s lets . match newlines, u enables full Unicode, y anchors at lastIndex, d records group indices.
Is my text uploaded?
No — matching happens entirely in your browser.
Does this regex tester support lookbehind and named groups?
Yes. Both are part of modern JavaScript and work in every current browser. Lookbehind is written (?<=...) or (?<!...), and named groups are (?<name>...) with $<name> available in replacements.
Why does my pattern work here but not in Python or Go?
Regex flavours differ. JavaScript does not support possessive quantifiers, atomic groups or inline modifiers like (?i), while other engines lack some JavaScript features. If your target is Python, PCRE, Go or Java, confirm the pattern in that runtime before shipping it.
How do I match across multiple lines?
Use the s flag so that the dot matches newline characters, and the m flag so ^ and $ match at line boundaries rather than only the start and end of the whole text. Without m, ^ matches only once at the very beginning.
Also free.
JSON formatter & validator
Paste JSON to format it with two or four spaces, sort keys, minify for transport, and get a clear error with line and column when it doesn’t parse.
header · payload · expiryJWT decoder
Paste a JSON Web Token to see its header and payload decoded, the algorithm, and whether it’s expired or not yet valid — all in your browser.
text · files · url-safeBase64 encoder / decoder
Encode text or a file to Base64, or decode Base64 back to text — with proper UTF-8 handling, an optional URL-safe alphabet, and a data-URL output for files.
v4 · v7 · bulkUUID generator
Generate random v4 UUIDs or time-ordered v7 UUIDs, in bulk, uppercase or lowercase, with or without hyphens.
unix ↔ dateTimestamp converter
Paste a Unix timestamp (seconds or milliseconds) or a date, and see it in UTC, your local zone and ISO 8601, plus relative time.
structural compareJSON diff
Paste two JSON documents and see exactly which keys were added, removed or changed — ignoring formatting and key order — as a list of paths and as a line diff of the normalised output.
Need a regex to ignore noise on a watched page? Page change monitoring takes ignore patterns.
Page change monitoring watches any URL, yours or theirs, and sends a highlighted diff, an alert and a report on your schedule. $2 a page a month, your whole team included.