System Prompt Builder AI & Writing
Assemble a structured system prompt from role, task, rules, format and refusal behavior.
System Prompt Builder is a free online tool that assemble a structured system prompt from role, task, rules, format and refusal behavior. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.
- Price
- Free — no account, no quota, no watermark
- Category
- AI & Writing
- Where it runs
- In your browser, on your device
- Files uploaded
- None
- Technology
- plain JavaScript
- Settings
- 8
- Works offline
- Yes, after the first visit
About System Prompt Builder
The parts of a system prompt that reliably matter are the same every time: who the model is, what it is doing, what it must not do, what the output should look like, and what to do when it cannot comply. That last one is the most commonly missing and the most expensive — a model with no instruction for the failure case will invent something plausible rather than admit the gap. Separate fields make the omissions obvious in a way a blank textarea never does.
How to use it
- Enter role, task and audience.
- Adjust the remaining 5 settings if the defaults do not fit your case.
The 8 settings
| Setting | What it does | Default |
|---|---|---|
| Role | Free text. | a support triage assistant for a SaaS product |
| Task | Free text. | Read a customer message and classify it, then draft a one-paragraph reply. |
| Audience | Free text. | customers who are frustrated and want a quick answer |
| Rules, one per line | Free text. | Never promise a refund or a delivery date.
Ask for the order number if it is missing.
Stay under 120 words. |
| Output format | Choose from 4: JSON, Markdown, Plain text, Unspecified. | JSON |
| JSON keys, comma separated | Free text. | category, urgency, reply |
| When it cannot comply | Choose from 3: Ask a clarifying question, Say so plainly and stop, Do what it can and flag the rest. | Ask a clarifying question |
| Include a prompt-injection guard | On or off. On by default. | On |
Under the hood
| Runs on | plain JavaScript — runs the whole thing |
| Controls | Role, Task, Audience, Rules, one per line, Output format, JSON keys, comma separated, When it cannot comply, Include a prompt-injection guard |
Questions
How long should a system prompt be?
As short as it can be while still covering those five parts. It is billed on every single request, so length here is a recurring cost rather than a one-off — and models follow four clear rules far more reliably than fifteen hedged ones. Cut anything the model already does unprompted.
Why does it add a security section?
Because anything that puts user content into a prompt is exposed to prompt injection, where the content contains instructions aimed at the model. Telling the model to treat that content as data reduces it measurably. It is a mitigation, not a boundary: real authorization has to happen outside the model.
Should I ask for JSON output?
If a program consumes the answer, yes — and say "no markdown fence, no commentary", because that is the failure mode. If a person reads it, prose is better. Most providers also offer a structured-output mode that enforces a schema properly, which beats asking politely.
What difference does the refusal instruction make?
A large one. Without it, a model handed an impossible or ambiguous request will usually produce a confident answer to a slightly different question. Telling it to ask, to stop, or to do the part it can turns a silent failure into a visible one.