Safe Regex Tester
Test a pattern with a step limit, so one that backtracks catastrophically is stopped rather than freezing the tab.
- 100% Free
- No account required
- Runs in your browser
- No data is uploaded
Not saved automatically
Private to this browser, not a cloud backup. Saves expire 7 days after the last save. Avoid saving sensitive data on shared devices.
Input
Paste or edit your text, then click “Run tool”.
Type, paste or drop a file
TextLn 1, Col 1Spaces: 2UTF-824 bytes
Output
Matches (read-only).
Read-only
TextLn 1, Col 1Spaces: 2UTF-80 bytes
Using the Safe Regex Tester
Overview
Test a pattern with a step limit, so one that backtracks catastrophically is stopped rather than freezing the tab.
Test a pattern with guards against catastrophic backtracking, so a bad pattern is stopped instead of freezing the tab.
How to use it
- Paste or type your Text into Input, drop a file onto it, or press Example to load a sample.
- Choose the settings in the Pattern bar under the editors.
- Press Run tool, or ⌘ ↵ from anywhere on the page.
- Read the result in Output, then copy or download it. The Result tab has size, line counts and next steps.
Input
Text.
Settings
- Pattern — for example ^a+$
- Flags — for example g
Output
Matches.
- Rejects risky nested quantifiers
- Input and pattern size limits
- Up to 500 matches listed
- Match positions
Tips
- Add the g flag to list every match instead of only the first.
- Text Diff compares line by line: + marks an added line, - a removed one.
- Use the safe regex tester for patterns that might backtrack badly.
Keyboard shortcuts
- ⌘ ↵
- Run the tool
- ⌘ K
- Search every tool
- /
- Filter the sidebar