Regex test + ReDoS check
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.
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 $.
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.
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.
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.
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/mcpclaude mcp add --transport http clawhard-sieve https://sieve.clawhard.com/mcp
Press Add to Claude, or open Customize → Connectors → Add custom connector, paste the URL and leave sign-in empty.
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.
codex mcp add clawhard-sieve --url https://sieve.clawhard.com/mcp
gemini mcp add --transport http clawhard-sieve https://sieve.clawhard.com/mcp
{
"mcpServers": {
"clawhard-sieve": { "url": "https://sieve.clawhard.com/mcp" }
}
}{
"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).
OpenAPI (custom GPT Actions, scripts) · llms.txt · MCP server card · Agent card · All Clawhard tools in one connector
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.
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.
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.
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.
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.
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.
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.
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