AI regex generator — plain English to regular expression
Describe what you want to match in plain English and get a working regular expression with a short explanation of each part. This is a bring-your-own-key AI tool: it works with your Anthropic (Claude) or OpenAI (GPT) API key, which is stored only in this browser and never sent to us to keep. Your text goes to your chosen provider through our server, which never logs or stores your key or your text. It is free — you pay the provider directly for what you use.
How to use it
- Add your Anthropic or OpenAI API key in the key bar (it is saved only in this browser).
- Paste your text and pick any options.
- Press the button — the result comes back from your chosen AI. Copy or Download it.
FAQ
How do I make a regex from a description?
Describe the pattern (for example, an email address or a ten-digit mobile number), choose a flavour and press Generate regex. The AI returns one expression plus a breakdown.
Is my description kept private?
Your API key lives only in this browser's local storage. Each request sends your text and key to your chosen AI provider through our server, which never logs or stores either. We keep no copy.
Which regex flavours does it support?
JavaScript, PCRE and Python are offered explicitly; describe others in the text and the AI will adapt. Always test the result against real samples.
Where do I get an API key?
From your provider: Anthropic (console.anthropic.com) for Claude, or OpenAI (platform.openai.com) for GPT. Paste it into the key bar once and it is remembered on this device until you clear it.
Does it cost anything?
The tool is free. You pay your AI provider directly for the tokens each request uses — usually a fraction of a cent for short text.
Limits
Generated regexes are a strong starting point — test them on real data, especially for edge cases and security-sensitive matching. Unlike our offline tools, this one calls a cloud AI, so it needs a connection and your own key.
Related
Test the output with the regex tester and replace tools.
Your key stays in this browser. Clear it any time from the key bar.