Menu

Search tools and guides

DMARC & DKIMCheck DMARC and DKIM, generate records and keys
SPF Record CheckerValidate SPF and count lookups against the limit of 10
DNS Blacklist CheckerCheck IPs and mail servers against spam blocklists
Email Header AnalyserTrace hops, delays and SPF/DKIM/DMARC in raw headers
Email ValidatorSyntax, MX, SPF and DMARC verification
DNS LookupQuery A, AAAA, MX, TXT, NS and more
WHOIS LookupRegistration data over RDAP
Website StatusAvailability and response-time checks
Ports ReferenceWhat runs on each TCP and UDP port, and if it's safe
MAC Address LookupFind a MAC address vendor and check if it's random
Download Time CalculatorHow long a file takes at your broadband speed
QR Code GeneratorQR codes for Wi-Fi, links and text, as PNG or SVG
User Agent ParserWhat your browser says about itself, decoded
IP ConverterDecimal, hex, binary and IPv6 conversion
Subnet CalculatorCIDR ranges, masks and subnet splitting
CIDR AggregatorMerge IPs and ranges into the fewest CIDR blocks
SSL CheckerInspect certificates, chains and expiry
HTTP HeadersAudit security headers and redirect chains
Password GeneratorCryptographically secure random passwords
Hash GeneratorMD5, SHA-1, SHA-256, SHA-384 and SHA-512
JWT DecoderDecode JWT claims and verify HS256, RS256, ES256
Unix Timestamp ConverterConvert epoch seconds or ms to UTC and UK time
UUID GeneratorGenerate UUID v4, v7 and ULIDs; decode any UUID
Cron Expression ExplainerCron schedules in plain English, with next runs
Regex TesterTest JavaScript regex with live match highlighting
Chmod CalculatorUnix permissions as octal, symbols and commands
Colour Contrast CheckerWCAG contrast ratio for text and background colours
JSON FormatterPretty-print, minify and validate JSON
Base64 EncoderConvert to and from Base64, Unicode safe
URL EncoderPercent-encode and decode URL strings
HTML EntitiesEscape and unescape HTML special characters
Text Diff CheckerCompare two texts line by line, word by word
Word & Character CounterWords, characters, reading time and SMS segments
Case ConverterUPPER, lower, Title Case, camelCase and more
URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs
DNS records explained: A, AAAA, CNAME, MX, TXT, NS and the restWhat each common DNS record type does, the rules that trip people up – CNAMEs at the root, MX pointing at an IP – and how TTL and caching really work.
Mbps and MB/s: why downloads look slower than your broadband speedWhy a 100 Mbps line downloads at 12 MB/s, why a 1 TB drive shows 931 GB, what slows real transfers, and what a UK advertised average speed promises.
Setting up SPF, DKIM and DMARC for Microsoft 365Step by step for a domain on Microsoft 365, from the first SPF record to a DMARC policy of reject, avoiding the mistakes that cause bounces.
SPF "too many DNS lookups": why it happens and how to fix itWhat the ten-lookup limit in RFC 7208 counts, how to tally your own record, and the fixes that work without silently breaking mail.
How to read a DMARC aggregate reportA field-by-field tour of the XML that receivers send to your rua= address, and how to turn it into a list of senders to fix before you enforce.
What your IP address reveals – and what it does notHow IP geolocation really works, why it often puts you in the wrong town, what a website can and cannot learn from your address, and how UK law treats it.
Diagnosing a website that will not load: DNS, TLS and HTTP in orderA methodical checklist for working out whether an outage is DNS, the certificate, the server or just you – and what each kind of failure looks like.

Arrow keys move through results, Enter opens one, Escape closes.

Regex Tester

Test JavaScript regular expressions with live highlighting, capture groups and replace

Type the pattern without the surrounding slashes. Pasting a literal such as /ab+c/gi splits it into pattern and flags.

Flags
Examples:

Matches are highlighted below as you type. The test text stays on this page and is never included in shared links.

Use $1 to $99 for numbered groups, $<name> for named groups, $& for the whole match, $` and $' for the text before and after it, and $$ for a dollar sign.

Matches

Quick reference
Characters and classes
.Any character except a line break (any at all with s)
\d \DDigit 0-9 / not a digit
\w \WWord character A-Z a-z 0-9 _ / not one
\s \SWhitespace / not whitespace
[abc]Any one of a, b or c
[^abc]Any character except a, b or c
[a-z]Any character from a to z
\p{L}Any letter in any script (needs u or v)
\t \n \rTab, line feed, carriage return
\. \* \\A literal dot, asterisk, backslash
Anchors and quantifiers
^ $Start / end of the text (of each line with m)
\b \BWord boundary / not a word boundary
* + ?0 or more, 1 or more, 0 or 1
{3}Exactly 3
{2,5}Between 2 and 5
{2,}2 or more
*? +? ??Lazy: as few as possible
Groups and lookaround
(abc)Capture group, numbered from 1
(?<name>abc)Named capture group
(?:abc)Group without capturing
a|ba or b
\1 \k<name>Back-reference to a group
(?=abc)Followed by abc
(?!abc)Not followed by abc
(?<=abc)Preceded by abc
(?<!abc)Not preceded by abc

About regular expressions

A regular expression (regex) is a compact pattern for finding text: every UK postcode in a document, every IP address in a log file, or every date written as 2026-11-09. They are built into almost every programming language, text editor, database and command-line tool. This tester uses your browser's own JavaScript engine, so a pattern that works here behaves the same in JavaScript and TypeScript code, and in Node.js and Deno. HTML pattern attributes use the same engine, but always with the v flag and only when the whole value matches. Other flavours such as PCRE (PHP, grep -P), Python and .NET are very similar, but differ in details such as lookbehind support, named-group syntax and flags.

How to use the tester

  1. Type your pattern into the Regular expression box, without slashes. Errors are explained in plain English as you type.
  2. Tick the flags you need. g finds every match rather than the first, i ignores case, m makes ^ and $ work per line, s lets a dot match line breaks, u enables full Unicode, y only matches where the previous match ended, and v (where your browser supports it) adds set operations inside classes.
  3. Paste the text to test against. Matches are highlighted in alternating colours, and the Match details table lists each match's position (a zero-based character index) and every capture group, by number and by name. A group that did not take part in a match is shown as "no match", which is different from matching an empty string.
  4. To try a substitution, type a replacement pattern. The Replace preview shows the result of text.replace(regex, replacement): without the g flag only the first match is replaced.
  5. Copy link shares the pattern and flags (as ?re= and &flags=). Your test text is deliberately left out, so log extracts and personal data are not leaked through a link.

Worked example

Press the ISO date example. The pattern (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}) with the g flag finds both dates in the sample text, and each row of the details table shows year, month and day as named groups (also available as groups 1, 2 and 3). The replacement $<day>/$<month>/$<year> rewrites them in British DD/MM/YYYY order, so 2026-03-29 becomes 29/03/2026. Untick g and only the first date is matched and replaced.

Catastrophic backtracking

JavaScript's regex engine is a backtracking engine. When a pattern contains nested or overlapping quantifiers, such as (a+)+$ or (\w+\s?)*$, and the text almost matches, the engine may try an exponential number of ways to split the text before giving up. Each extra character doubles the work: forty characters can take minutes or hours, and fewer than a hundred can take longer than the age of the universe. On a server this is a denial-of-service hole known as ReDoS. This tester runs every match in a separate background worker, and if it has not finished within two seconds the worker is stopped and you are told why, so the page never freezes. Try the Catastrophic backtracking example to see it. The cure is to make the alternatives unambiguous: ^a+$ does the same job as ^(a+)+$ instantly.

Limitations

Only JavaScript syntax is supported; flavour-specific features such as possessive quantifiers, atomic groups, inline modifiers like (?i) and recursion are reported as errors. The v flag needs a recent browser. To keep the page responsive, at most 5,000 matches are found and 1,000 are listed in the table. Character indexes count UTF-16 code units, as JavaScript does, so most emoji count as two or more.

Privacy

Matching runs entirely in your browser, in a worker created on the page itself. Your pattern and test text are never sent to a server or stored. Only the pattern and flags go into the address bar, and only when you use the page; the test text never does.

Common questions

What does \d mean in regex?

In a regular expression, \d matches any single digit from 0 to 9. Add a quantifier to match more than one: \d+ matches one or more digits and \d{4} matches exactly four. The capital form, \D, matches any character that is not a digit. In JavaScript \d covers only the digits 0 to 9; some other flavours also accept digits from other scripts.

What is the difference between .* and .*? in regex?

In a regular expression, .* is greedy and .*? is lazy. The greedy form matches as much text as it can while still letting the rest of the pattern succeed; the lazy form matches as little as it can. Against <b>one</b><b>two</b>, the pattern <b>.*</b> matches the whole string, while <b>.*?</b> stops at the first closing tag.

What do ^ and $ mean in regex?

In a regular expression, ^ matches the start of the text and $ matches the end, so ^\d+$ only matches text made up entirely of digits. Neither consumes a character; they are positions. With the m (multiline) flag they match at the start and end of every line instead. Inside square brackets ^ means something else: [^0-9] matches any character that is not a digit.

How do I match a full stop or other special character in regex?

To match a special character literally in a regular expression, put a backslash in front of it: \. matches a full stop and \? a question mark. The characters that need this are . * + ? ^ $ { } ( ) [ ] | \. An unescaped dot matches almost any character, which is why example.com also matches "exampleXcom".

Accessibility

Adjust how the site looks and behaves. Your choices are saved in this browser only.

Colour theme
Text size
Accessibility statement