Sieve No account · runs on the real engine

Regex test + ReDoS check

Does the regex really match?

Type a pattern, the strings it must match and the ones it must reject. Sieve runs it on JavaScript's engine or RE2 (Go), marks every line pass or fail with the match and its groups, and proves whether the pattern can backtrack until it hangs.

Try

Each line is one string. Press Ctrl or Cmd + Enter to test. Patterns and strings are run on Sieve's server and not stored.

Run, don't guess

Every line, pass or fail.

The pattern runs on V8's own RegExp (JavaScript, TypeScript, Node.js, browsers) or on RE2, which matched Go's regexp on all 624 cases of our differential test. A string that should be rejected shows the exact part that matched, usually a missing ^ and $.

ReDoS

Proof, with the input that hangs it.

Sieve runs the recheck analysis: proven linear, or exponential or polynomial backtracking with a working attack string and the part of the pattern to fix. ^(a+)+$ hangs on 33 characters. ^([a-z]+\s)*$ looks risky but is linear.

What it can't do

Run Python or PCRE.

Only JavaScript and RE2 syntax run. For patterns written for Python, PCRE or Ruby, Sieve explains the common differences: (?P<name>), (?i), possessive quantifiers, and \A or [[:alpha:]] read as plain characters in JavaScript.

Use with AI

Let the agent test its own regex.

Add the MCP server https://sieve.clawhard.com/mcp (tools sieve_test_regex and sieve_check_redos) to Claude, ChatGPT, Cursor or any MCP client, or call the JSON API described at /openapi.json. An agent can run a validator on real examples before it commits it, and check a codebase's patterns for ReDoS. Sieve is also on the Clawhard MCP server at https://mcp.clawhard.com/mcp.

Use Sieve with your AI

Add Sieve to ChatGPT, Claude, Cursor or any assistant that supports MCP, then ask it to run a regular expression on strings it should and should not match (JavaScript or RE2/Go), with matches and groups, and prove whether it is safe from ReDoS. No key, no login.

https://sieve.clawhard.com/mcp

Claude Code

claude mcp add --transport http clawhard-sieve https://sieve.clawhard.com/mcp

Claude (web and desktop)

Press Add to Claude, or open Customize → Connectors → Add custom connector, paste the URL and leave sign-in empty.

ChatGPT

Open Plugins → + → Add custom MCP server, paste the URL, choose No authentication, accept the warning, then Create as a plugin. Start a chat and type @ to use it.

More ways to connect

Codex

codex mcp add clawhard-sieve --url https://sieve.clawhard.com/mcp

Gemini CLI

gemini mcp add --transport http clawhard-sieve https://sieve.clawhard.com/mcp

Cursor, Windsurf and others (mcp.json)

{
  "mcpServers": {
    "clawhard-sieve": { "url": "https://sieve.clawhard.com/mcp" }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "clawhard-sieve": { "type": "http", "url": "https://sieve.clawhard.com/mcp" }
  }
}

No desktop app? Add to VS Code in the browser · VS Code Insiders · Add to Cursor in the browser

Other apps: Goose · LM Studio. Any MCP client works with the URL (Streamable HTTP, no headers).

Common questions

Sieve runs a regular expression for real, on JavaScript's engine or on RE2 (Go), against strings that should and should not match, and shows each pass or fail with the matched text and groups. It also proves whether the pattern can backtrack catastrophically (ReDoS) and gives the input that would hang it. No account.

How do I test a regular expression?

Paste it into Sieve with strings it should match and strings it should not. Sieve runs it on JavaScript's engine (or RE2 for Go) and marks each string pass or fail with the match and its groups. An AI assistant can do the same with the MCP tool sieve_test_regex.

Why does my regex match strings it should reject?

Most often it is not anchored: without ^ and $, a validator like \d{4}-\d{2}-\d{2} also matches "on 2026-11-20 at noon". Sieve shows the part that matched and suggests ^(?:...)$, or test with match set to full.

What is ReDoS?

Regular expression denial of service: a pattern such as ^(a+)+$ makes a backtracking engine try exponentially many ways to match a failing input, so a few dozen characters can hang a server thread. Sieve proves whether a pattern is linear, or gives the attack string and the part to fix.

Is ^([a-z]+\s)*$ vulnerable to ReDoS?

No. Each repetition must end in whitespace, which [a-z] cannot match, so there is only one way to split the input; recheck proves it linear. (a+)+ and (\w+\s?)* are exponential.

Why does my Python regex fail in JavaScript?

JavaScript names groups (?<name>...) instead of (?P<name>...), has no leading inline flags such as (?i), no possessive quantifiers or atomic groups, and without the u flag reads \A, \Z and \h as plain letters. Sieve reports the error with the fix.

Does Go support lookahead?

No. Go's regexp (RE2) has no lookahead, lookbehind or backreferences, in exchange for linear-time matching. Sieve runs patterns on RE2 and says when a pattern needs restructuring.

Can an AI assistant use Sieve?

Yes. Add the MCP server https://sieve.clawhard.com/mcp (tools sieve_test_regex and sieve_check_redos) or call the JSON API at /openapi.json. It is also on the Clawhard MCP server at https://mcp.clawhard.com/mcp.

For AI assistants and developers: llms.txt · API (OpenAPI) · MCP server · sitemap