Developer·Updated 2026-04-22

Regex Tester & Debugger

Test regular expressions live, highlight matches and get pattern explanations.

Regex Tester & Debugger

How it works

  1. 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. 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. 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