Premium Converters
Loading
Loading
Loading
Test JavaScript regular expressions against sample text with live highlighting, named groups, and quick patterns.
Utility
Generated on August 22, 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:
JSON ↔ YAML Converter
Convert between JSON and YAML in either direction. Live preview, parse-error reporting, copy + download.
JSON ↔ CSV Converter
Convert JSON arrays of objects to CSV (or back). Custom delimiter, type coercion, copy + download.
Base64 Encode / Decode
Encode text or files to Base64 (and back). UTF-8 safe + URL-safe variant supported.
URL Encoder / Decoder
Percent-encode and decode URLs and query parameters. Supports both component and full-URI modes.
Hash Calculator (MD5 / SHA-1 / SHA-256 / SHA-384 / SHA-512)
Compute cryptographic hashes of text or files in your browser. All five major algorithms, no upload.
UUID Generator (v4)
Generate cryptographically random UUIDs (v4) in bulk. Multiple format options, copy + clear.
Markdown ↔ HTML Converter
Convert Markdown to HTML (or back) with live preview. Supports CommonMark + GFM (tables, fenced code).
Image Format Converter (PNG / JPEG / WebP)
Convert images between PNG, JPEG, and WebP in your browser. Adjustable quality. No upload — fully private.
Browse all Utility calculators & converters
See every tool in this category, plus FAQs and category-specific guides.