Regex Tester & Debugger
Test regular expressions live, highlight matches and get pattern explanations.
Regex Tester & Debugger
How it works
- 1.
Enter a pattern
Paste the broken JSON response straight from ChatGPT, Claude, or Gemini. Trailing commas, missing quotes, and Markdown code fences are all fine.
- 2.
Paste test text
The tool strips code fences, repairs the syntax, pretty-prints with 2-space indent, and validates against the JSON spec. Errors include a line number.
- 3.
Read the explanation
Copy the result to your clipboard or paste it straight into your codebase. Everything runs locally. Nothing goes to a server.
FAQ
Which regex engine is used?+
JavaScript regex (ECMAScript). Supports flags g, i, m, s, u and y.
Are lookbehinds supported?+
Yes, in all modern browsers — (?<=...) and (?<!...) both work.
Can I cause infinite loops?+
We cap global matches at 10,000 iterations to catch zero-width infinite loops.
Related tools
- DeveloperJSON Schema to TypeScript and Zod
Generate TypeScript interfaces and Zod schemas from JSON Schema.
- DeveloperCron Expression Builder
Translate cron expressions to plain English and preview the next runs.
- DeveloperBase64, Hex & URL Encoder
Encode and decode Base64, Base64 URL-safe, Hex and URL in one tool.