AI Prompt Optimizer
Analyze and refine your AI prompts for clarity, specificity, and ethics. Detects vague words, bias, and missing elements, with customizable refinement options.
How to use this tool
- Paste your prompt into the box. The score and highlights update as you type.
- Fix what you can from the "Missing elements" list, such as who the output is for or the format you want.
- Pick what the prompt is for: text and chat, image, or video.
- Click Optimize. The default provider is free and needs no key.
- Read the result and fill in any [placeholders] before you use it.
Paste your prompt below. We'll analyze it for clarity, specificity, and potential issues.
Refinement Options
Select options to automatically enhance your prompt.
Prompt Engineering Tips
- Be specific about what you want - avoid vague terms
- Include context and background information
- Specify the desired output format (bullets, paragraphs, code, etc.)
- Set clear constraints and boundaries
- Use examples when possible to guide the AI
- Consider assigning a role (e.g., "Act as a senior developer...")
How the AI Prompt Optimizer works
The optimizer works in two steps. First it scores your prompt in your browser against six elements that current guidance from Anthropic, OpenAI and Google keeps coming back to: a clear task, context and purpose (who it is for and why), the output format, constraints, examples, and success criteria (what a good result looks like). It highlights vague words and loaded terms and lists the elements that are missing. A role or persona ("act as…") is not scored; it can help, but modern models gain far more from context and a clear definition of success.
The overall score averages three sub-scores. Clarity starts at 100 and loses points for vague words and passive phrasing. Specificity is the share of the six elements present, with a small bonus for prompts of 10 or more words. Inclusive language loses points for biased or loaded terms. Words like "always" and "never" are not penalised, because they are useful in constraints.
Then it rewrites the prompt with an AI model, following current practice. Text prompts get a clear task, context with the reasons behind instructions, labelled sections for longer prompts, an explicit format and success criteria, in calm language without ALL-CAPS commands. Missing facts become [placeholders] for you to fill in rather than invented details. Image prompts are written as natural-language descriptions (subject, setting, composition, lighting, style, mood) with a keyword version and an aspect-ratio suggestion, without outdated tags like "8k" or "masterpiece". Video prompts describe one shot or a short sequence with camera movement and motion, plus an audio line for models that generate sound.
The default provider is Groq running OpenAI’s open-weight GPT-OSS 20B model, which needs no API key: your prompt is sent through this site’s server to Groq. You can instead use Google Gemini or OpenAI with your own key, a local model through Ollama, or any OpenAI-compatible endpoint.
When to use it
- Turning a one-line request into a structured prompt before using it in Claude, ChatGPT or Gemini.
- Writing a detailed image prompt for Midjourney, FLUX, GPT Image or Imagen from a rough idea.
- Writing a shot description for Veo, Sora, Kling or Runway.
- Building a reusable prompt or system prompt for a team or an app.
Tips
- Explain why. "Keep it under 100 words because it will be read on a phone" works better than "Keep it under 100 words".
- One short example of the output you want often improves results more than extra instructions.
- Say what a good result looks like. It gives the model something to check its own answer against.
- Skip "think step by step" and shouted capitals. Current models reason when needed and over-react to emphatic commands.
- For anything confidential, use a local model through Ollama so the prompt never leaves your computer.
Frequently asked questions
Is the score calculated by AI?
No. The score is calculated in your browser using pattern checks for the six prompt elements, vague words, passive phrasing and loaded terms. Only the rewrite step uses an AI model.
Why doesn’t it ask me to add a persona like "act as an expert"?
A persona can help with tone, but with current models it matters much less than context, a clear task and a definition of a good result. The optimizer focuses on the elements that change results most.
Is my prompt stored?
No, the prompt text is not saved. With the free default, your prompt passes through this site’s server to Groq, or to Google Gemini if Groq is busy, and the server logs request details such as prompt length, response time, IP address and browser. On Google’s free tier, Google may use submitted content to improve its products, so use your own key or a local model for anything confidential. With your own key or a local model, the prompt goes straight from your browser to the provider you chose.
Does it work for Midjourney, FLUX or Stable Diffusion?
Yes. Choose the image target. You get a natural-language prompt for modern models, a keyword version for Stable Diffusion-style tools, an "avoid" list for tools with negative prompts, and a suggested aspect ratio.
Is there a limit on free use?
Yes. The free default runs on shared free-tier keys, so each visitor gets a limited number of free optimizations per day. The limit resets at midnight UTC. Add your own Groq, Gemini or OpenAI key, or use Ollama, for unlimited use.
Do I need an API key?
No, the default Groq provider works without one. Gemini and OpenAI need your own key, and local models need Ollama installed on your computer.
Why is the overall score not 100 even after optimizing?
Not every prompt needs examples or detailed success criteria, so a good prompt can score in the 70s or 80s. Treat the missing elements as suggestions, not a checklist.