Works on this device
Prompt Editor & Validator
Check a prompt before you send it to a model. Fill its template variables, find missing values, and catch brackets, code fences and tags that are not closed. Nothing is sent to any model.
Your prompt
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your checks will show here
Type or paste a prompt, or choose Try an example.
Your checks
How it was worked out
How to use the prompt editor
- Type or paste your prompt, or open a prompt file. The checks update as you type.
- To fill a template, choose Find and fill template variables, pick the variable style and enter a value for each name. You can also paste values as lines such as
topic = refunds. - Copy or download the filled prompt from the result.
- To check a prompt, choose Check length and structure and switch the checks on or off.
- To check a list of chat messages in JSON, or to turn labelled text such as
User: Hellointo such a list, choose the third task.
Variable styles
{{name}}: double braces, as in Mustache, Jinja and many prompt tools. Spaces inside are allowed:{{ name }}. Filters such as{{ name | upper }}are listed as problems and are not filled.{name}: single braces, as in Pythonstr.formatand f-string prompt templates. As in Python,{{and}}stand for a brace meant as text, so JSON examples in a prompt must use doubled braces. A single brace that does not start a variable is listed as a problem.${name}: a dollar sign and braces, as in JavaScript template strings.- A name starts with a letter or
_and has letters, digits,_or dots (user.name). A variable with no value stays as it is in the filled prompt and is listed as missing. A value whose name is not in the prompt is listed as not used.
The structure checks
- Brackets: every
(,[and{must be closed by its partner, in the right order. Text inside code fences and insideinline codeis left out. - Code fences: a line of three or more backticks or tildes opens a code block; a line of at least as many of the same mark closes it.
- Tags: an opening tag such as
<context>needs its closing tag</context>. Tags that close themselves (<br/>) and empty HTML elements such as<br>need none. - Empty sections: a pair of tags with nothing between them, or a Markdown heading with no text before the next heading of the same or a higher level.
- Repeated lines: a line outside code fences that is the same as an earlier one.
- Length: characters, words and two token estimates (characters ÷ 4 and words ÷ 0.75, rounded up). These are rules of thumb for English text, the same as in the Token Counter, and never a model’s count.
Chat message lists
Many chat services take a list of messages in JSON, each with a role and a content. The check reads such a list (or an object with a messages list) and lists, for each message, its role, its length and its problems: a role that is not in your list of allowed roles, missing or empty content, or a content part without a type.
The second way turns labelled text into such a list. Start each message on a new line with its role and a colon, such as User: or Assistant:. This is a quick way to write few-shot examples: pairs of a user message and the answer you want.
Worked example
The example prompt uses {{audience}}, {{topic}}, {{ max_words }} and {{sender}}. With the values new customers, our refund rules and 120, the result says Not ready: 1 variable has no value, because sender has no value. The filled prompt starts with "Write a short email for new customers about our refund rules." and still shows {{sender}}.
Limits you should know
- This page does not send your prompt to any model or service, and it does not test how a model answers. It cannot test prompt injection or judge the quality of a prompt.
- Token numbers are estimates. For an exact count, use the Token Counter with the tokenizer file of your model.
- Only plain variable names are filled. Template logic (loops, conditions, filters) is not run.
- The bracket check does not read quotes, so a bracket inside quoted text still counts.
- Allowed roles and message formats differ between services. Type the roles your service uses.
- Prompts of up to 200,000 characters are read.