AI Prompt Formatter — Turn Rough Notes Into Clear Prompts
Paste a one-line idea and get a structured AI prompt with role, task, constraints, and output format — the four sections every modern chat model handles best. Works for GPT-4, Claude, Gemini, Llama. No signup, no API call, no upload.
How it works
Most people's “prompts” are really just questions shouted at an AI: “fix this bug”, “write a blog about photosynthesis”. Modern chat models will respond — but they have to guess your role, your audience, your tone, your preferred output format, and what counts as “done.” A well-structured prompt removes that guesswork. This tool runs four deterministic passes over your notes and produces one.
1. Cleaning
The notes are trimmed, repeated whitespace is collapsed, smart quotes are converted to straight quotes, and common filler openers are dropped (“can you please”, “hey ChatGPT”, “I'd like to”). The first letter is capitalised and a full stop is appended if missing. Cleaning is reversible-looking but does not change the meaning of your input.
2. Classification (keyword scoring)
The cleaned text is matched against six topic categories plus a fallback:
- Coding — Implement, debug, refactor, or explain code.
- Writing — Draft blog posts, articles, emails, or copy.
- Analysis — Compare, evaluate, or break something down.
- Learning — Explain a concept, build intuition, define a term.
- Summarization — Condense a source into a faithful short version.
- Creative — Brainstorm names, ideas, stories, or alternatives.
- General — Anything that doesn't fit the other categories.
Each category has a list of high-weight (score 2) and low-weight (score 1) keywords. The category with the highest sum wins. If everything scores zero — or you override the picker — the result falls back to General.
3. Verb detection
The first three tokens of the cleaned notes are checked against a fixed set of action verbs (write, fix, explain, summarize, and so on — about forty in total). If one is present, the notes become the task line as-is. If none is present, the category's default verb is prepended so the prompt's Task section always reads as a directive rather than a fragment.
4. Templating
The selected category supplies a role line, a default audience, tone, length, and an output-format description. Your explicit hints override the defaults. The four sections are then substituted into one of two equivalent templates:
# Role
You are {role}.
# Task
{verb-led task line}
# Constraints
- Audience: {audience}.
- Tone: {tone}.
- Length: {length}.
- {category-specific guardrail}
# Output format
{output description}The Anthropic-style XML variant wraps the same four sections in <role>, <task>, <constraints>, and <output_format> tags. Both renders are normalised (strip headings, strip tags, strip list bullets, collapse whitespace, lowercase) and asserted byte-equivalent — the green “cross-check passed” badge on the result tile confirms it.
Everything is deterministic. The same input plus the same choices always produces the same prompt — useful when you want to A/B-test two prompts against the same task and need the comparison to be apples-to-apples.
Worked examples
Frequently asked questions
Sources & references
- Anthropic — Prompt engineering overview (Claude API docs)
- Anthropic — Use XML tags to structure prompts
- OpenAI — Prompt engineering guide (developer platform)
- Google — Gemini API prompting strategies
- Brown et al., 2020 — Language Models are Few-Shot Learners (GPT-3, arXiv)
- Wei et al., 2022 — Chain-of-Thought Prompting (arXiv)
The role templates, keyword lists, and source documents were last cross-checked on 2026-05-12. The page is reviewed whenever a referenced provider publishes a substantive update to its prompt engineering guidance.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a prompt that came out wrong, a missing task category, or a rough-notes pattern the classifier mislabelled?
Email me at [email protected] — most fixes ship within 24 hours.