Test and debug regular expressions with real-time matching and highlighting.
100% Private — Your Data Never Leaves Your Browser
All regex testing, matching, and replacement operations run entirely in your browser. Your patterns and test data are never sent to any server.
g for global (all matches), i for case-insensitive, m for multiline, s for dotall, and u for Unicode.Regular expressions (regex) are a powerful text-matching language used to search, validate, extract, and transform strings. Built from a combination of literal characters and special metacharacters, regex patterns can describe everything from simple word matches to complex multi-part validation rules. They are supported by every major programming language, most text editors, command-line tools like grep and sed, and database query engines.
Quantifiers like *, +, and {n,m} are greedy by default, meaning they match as much text as possible. For example, <.*> matches from the first < to the last > in a string. Adding a ? after a quantifier makes it lazy (non-greedy), matching as little as possible. <.*?> matches from < to the very next >. Understanding this distinction is critical for correctly parsing HTML, log files, and structured text with repeating delimiters.
Parentheses in a regex create capture groups that remember the matched text. Groups are numbered from left to right: (a)(b(c)) has three groups. Named groups (?<name>...) make patterns more readable. In replacement strings, $1, $2, etc. refer to captured values, and $& refers to the entire match. Non-capturing groups (?:...) group without capturing, improving performance when you only need grouping for alternation or quantifiers.
Lookahead (?=...) and lookbehind (?<=...) are zero-width assertions that check for patterns without including them in the match. Positive lookahead asserts what follows; negative lookahead (?!...) asserts what does NOT follow. Lookbehind works similarly for what precedes the current position. These are essential for context-aware matching like finding words not followed by specific suffixes, or numbers preceded by currency symbols.
Build and test regex patterns for email, phone number, ZIP code, credit card, username, and other form field validation before implementing them in your application's frontend or backend.
Extract timestamps, IP addresses, error codes, request paths, and other structured data from server logs, application logs, and audit trails using targeted regex patterns.
Parse HTML, XML, CSV, or plain text to extract specific data fields like product prices, dates, URLs, or user information using capture groups and lookarounds.
Test bulk find-and-replace patterns for code refactoring, renaming variables across files, updating import paths, or migrating API endpoints.
Design and test regex patterns for URL routing in web frameworks, REST API path matching, and query parameter extraction.
Build patterns to remove extra whitespace, fix inconsistent capitalization, strip HTML tags, normalize date formats, or clean up imported data before processing.
Verify regex patterns that enforce password complexity requirements like minimum length, required character types (uppercase, lowercase, digits, special characters), and forbidden patterns.
Students and educators can use the real-time highlighting, match details, and cheat sheet to learn regex concepts interactively. Experiment with patterns and immediately see what they match and why.
Find and replace text with regex support and batch processing.
Validate JSON data and get detailed error messages with line numbers.
Encode and decode Base64 strings and files.
Encode and decode HTML entities for safe web content.
Format, validate, and beautify JSON data instantly.
Generate random UUIDs (v4) instantly.
Encode and decode URLs and query parameters.

Founder & Developer of FreeKit
I personally designed and built every tool on this website — including the one you just used. If these tools have been helpful, I can build custom tools, automation workflows, websites, and SEO solutions tailored to your business.
Remote: Available Now
United States & European company
USD $25/hour or USD $1,500/month
On-site: Open to Relocation
With work visa & travel support