Free online regex tester and debugger. Test regular expressions with real-time matching, flags (g, i, m, s, u, y), match groups, lookahead/lookbehind, and replacement testing. Includes built-in regex cheat sheet and common pattern library. Essential for developers. 100% browser-based.
100% browser-based — your data never leaves your device
Test regular expressions with real-time matching, syntax highlighting, and cheat sheet.
user@example.com admin@test.org invalid-email
Count words, characters, sentences, and paragraphs in your text instantly.
Character CounterCount characters, words, sentences, and paragraphs in your text with real-time character analysis.
Slug GeneratorGenerate URL-friendly slugs from any text. Supports multiple separator styles.
Lorem Ipsum GeneratorGenerate placeholder text for your design and development projects.
URL Encode/DecodeEncode or decode URLs and query strings with proper percent-encoding.
URL Query ParserParse URL query parameters into a readable key-value table.
Diff CheckerFind differences between two texts with line-by-line highlighting.
Case ConverterConvert text between uppercase, lowercase, title case, sentence case, and more.
Base64 Encode/DecodeEncode or decode Base64 text instantly in your browser.
Regex TesterTest regular expressions with real-time matching, syntax highlighting, and cheat sheet.
Markdown PreviewWrite and preview markdown with live HTML rendering.
Markdown EditorWrite and preview markdown with live HTML rendering and syntax highlighting.
A regular expression that fails in production is usually one you never tested against real input. This tester runs patterns against your text using JavaScript's built-in RegExp engine, the same one Node.js and browsers use, so what works here will work in your code:
All matching runs locally in your browser. Your patterns and test data never leave your device.
The obvious moment is before deployment: you have written a validation pattern for email, phone, or postal code input, and you want proof it behaves. Building the pattern here, testing it against a handful of realistic and deliberately broken inputs, and confirming the capture groups extract what you expect is how you avoid a pattern that passes your sample but mangles real-world data. The flags support is part of that, because a pattern that only matches once when you need every occurrence, or that ignores case when you need it honored, is a bug you can catch in seconds.
The replace tool makes the tester useful for cleanup workflows too. Renaming a field across sample text, normalizing whitespace, or extracting structured data from an unstructured log line is all testable before it becomes a script. When you can watch the substitution happen live, edge cases you would have missed in a quick mental dry-run surface immediately.
Data extraction from messy text is another steady use. A pattern with capture groups pulls names, IDs, dates, or URLs out of paragraphs that have no structure, and the match details view shows exactly which part of the pattern captured which value, which is where most extraction mistakes are born.
Regex work is applied to real data by nature: sample phone numbers, emails, identifiers, and log lines you test against are frequently drawn from production systems. A cloud tester that records your sessions stores both your patterns and the data they ran against, which is a map of your validation logic plus a sample of your records.
Because every match is computed locally in your browser, your patterns and test strings stay on your machine. You can develop and debug validation for customer-facing forms without handing sample data to a third party.
Type your regular expression in the pattern field (without delimiters).
Paste the text you want to test against in the test string area.
Enable flags like g (global) or i (case-insensitive) and see matches highlighted in real-time with match details.
Practical examples to help you get the most out of Regex Tester:
Pattern: ^[\w.-]+@[\w.-]+\.\w{2,}$
Test: 'user@example.com' — matches
Test: 'invalid-email' — no matchPattern: https?://[\w./?-]+/i Test: 'Visit https://example.com/page?t=1 for more info' Matches: ['https://example.com/page?t=1']
Characters like ., +, *, ?, [, ], (, ), {, }, ^, $, |, and \ need to be escaped with a backslash when you want to match them literally. Use \. to match a literal period.
Without the g flag, regex only finds the first match. If you need all matches in the text, always add the g (global) flag to your pattern.
No. All regex testing happens locally in your browser.
JavaScript's built-in RegExp engine, consistent with Node.js and browser environments.
See regex matches highlight in real-time as you type your pattern and test string.
Toggle global, case-insensitive, multiline, dotall, unicode, and sticky flags.
View each match's index, groups, and capture group values.
Test regex replacements live before using in code.
Regex Tester is useful in a variety of scenarios across different workflows:
Debugging and testing regular expressions before deploying to production code
Validating input patterns like email, phone, and postal code formats
Extracting structured data from unstructured text using capture groups
Begin with a basic pattern that matches your target, then gradually add features like lookaheads and quantifiers. Test each addition incrementally.
The g flag finds all matches, i makes it case-insensitive, and m changes ^ and $ to match line boundaries. Combine flags for powerful pattern matching.
Explore more tools in the Developer Workspace workspace:
JSON Formatter
Format, minify, validate, and explore JSON with tree view, JSONPath queries, and multi-format export — the complete JSON workbench.
JSON Validator
Validate JSON data and detect syntax errors with detailed error messages and line numbers.
JSON Compare
Compare two JSON files side by side with real-time diff highlighting.
JSON Path Tester
Test JSONPath expressions against JSON data and see matched results.
JSON Query Tool
Extract values from JSON using dot-notation and bracket-notation paths.
JSON Schema Generator
Generate JSON Schema (draft-07) from sample JSON data automatically.