Regex Tester
Test regular expressions against sample text.
- On your device
- No signup
Private on your device
Your information stays on your device and is not uploaded.
Test regular expressions against sample text.
Build a printable regex cheat sheet for patterns you need.
Compare two pieces of text and highlight changes.
Format, minify, and validate JSON with optional key sorting.
Count characters with and without spaces in real time.
Compare two JSON documents and instantly see added, removed, and changed values. JSON mode highlights changed keys with path hints.
Format, minify, and validate XML with readable indentation.
Compare two XML documents and see tag, attribute, and text line changes.
Test JavaScript regular expressions against sample text with highlighted matches, capture details, and token-by-token explanations. Runs locally in your browser.
1. Enter the pattern (without surrounding slashes unless you need them in the pattern). 2. Paste sample text. 3. Review matches, groups, and the explanation. 4. Iterate until captures match the fields you expect.
Example: pattern (\d{3})-(\d{2})-(\d{4}) on 123-45-6789 highlights the full match and three capture groups for area, group, and serial.
Enter a regular expression and sample text to debug matches, capture groups, highlighted output, and token-by-token explanations. Everything runs locally in your browser.
Results are based on the inputs you provide and may not cover every edge case. This tool is for general use and is not professional advice.
Your data stays on your device and is not uploaded.
FAQ
Yes. It is free to use and you do not need to sign in or create an account.
See the privacy note on this page. Many tools run on your device; some heavier file tools may use secure temporary processing when required.
Yes. Open this page on your phone or tablet, enter your inputs, and use the on-screen controls.
Page last reviewed: