Premium Converters
Loading
Loading
Loading
Test JavaScript regular expressions against sample text with live highlighting, named groups, and quick patterns.
Utility
Generated on May 23, 2026
Test JavaScript regular expressions against sample text with live highlighting, named groups, and quick patterns.
The Regex Tester runs your regular expression against sample text and highlights every match in real time. Built on the JavaScript regex engine (the same one your browser, Node.
Formula
JavaScript RegExp follows ECMAScript 2018+ — supports lookbehind, named capture groups (?<name>…), Unicode property escapes \p{…}, and the s/dotAll flag.You're testing a regex because something is matching when it shouldn't, or not matching when it should — usually at the worst possible moment, like during a deploy or a five-minute window before a demo. The instinct to write a regex inside the editor and rely on a unit test to tell you whether it works is fine for the final pattern; for iterating, you want instant visual feedback. Paste the sample text on one side, type the pattern on the other, and watch every match highlight in real time as you tweak. This runs the actual JavaScript regex engine (the one your browser and Node use), not a slightly-different implementation — so if it works here, it works in your code. The flags panel saves the embarrassment of forgetting `g` and wondering why only the first match appears, or skipping `m` and being confused why `^` doesn't anchor to line starts. Built-in patterns for emails, URLs, IPv4, hex colours, Pakistan CNIC, and phone numbers give you a sane starting point instead of copying something from a Stack Overflow answer dated 2011. Capture groups list out per match so you can verify your `(?<name>...)` extraction works before plugging it into production code.
The Regex Tester runs your regular expression against sample text and highlights every match in real time. Built on the JavaScript regex engine (the same one your browser, Node.js, and React/Vue apps use), so what works here works in your code. Toggle global, case-insensitive, multiline, dotall, and unicode flags with one click. Includes ready-made patterns for emails, URLs, IP addresses, dates, hex colors, phone numbers, and Pakistan CNIC. Capture groups are listed per match for inspection. Useful for log parsing, form validation, code refactoring, and learning regex.
Email match: `[\w.+-]+@[\w-]+\.[\w.-]+` matches `hello@example.com` (use it for quick validation, not strict RFC 5322 compliance).
Pakistan CNIC: `\b\d{5}-\d{7}-\d\b` matches `12345-1234567-1`.
Extract URLs from text: `https?://[\w.-]+(?:/[\w./?%&=-]*)?` with the `g` flag.
Find all hex colors: `#[0-9a-fA-F]{3,8}\b` — useful in CSS / HTML files.
Validate IPv4: `\b(?:\d{1,3}\.){3}\d{1,3}\b` (note: doesn't enforce 0-255 ranges).
Jump to a ready-made conversion — useful for quick reference and sharing:
Base Converter
Convert integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — built for programmers debugging memory addresses, bitmasks, and hex colors.
Unix Timestamp Converter
Translate Unix epoch timestamps (seconds or milliseconds since Jan 1 1970 UTC) to readable ISO, UTC, and local-timezone dates — auto-detects format and handles the Y2038 problem.
Color Converter
Translate colors between HEX, RGB, and HSL with a live swatch preview — built for CSS work, brand palette design, and converting Tailwind shades between formats.
Word Counter
Live word, character, sentence, and paragraph counter with reading and speaking time estimates — ideal for essays, blog SEO, tweets within 280 chars, and timed speeches.
Case Converter
Instantly convert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, and kebab-case — ideal for variable renaming, URL slugs, and headings.
Password Generator
Generate cryptographically secure random passwords (6 to 64 chars) using the browser's Web Crypto API, with strength meter and optional uppercase, digits, and symbol character sets.
Text Reverser / Palindrome Checker
Reverse any text character-by-character or word-by-word, plus check classic palindromes like "A man, a plan, a canal: Panama" while ignoring spaces, punctuation, and case.
QR Code Generator
Create QR codes from URLs, text, Wi-Fi, contact cards, email, phone, SMS, and locations. Free PNG and SVG download.
Browse all Utility calculators & converters
See every tool in this category, plus FAQs and category-specific guides.