Valid JSON every time
Quotes, line breaks and special characters are escaped, so the output always parses.
Build a structured JSON prompt from fields, or validate and pretty-print a JSON prompt you paste
This tool is completely free — no credits required. All processing happens in your browser.
{
"role": "You are an assistant that writes meeting notes.",
"task": "Summarize the meeting and list the action items.",
"context": "The transcript is from a 30-minute product planning call with four people.",
"constraints": [
"Use only the provided transcript",
"At most 5 action items",
"Name an owner for every action item"
],
"output_format": "JSON with keys summary (string) and action_items (array of {owner, task, due})",
"examples": []
}JSON prompts keep each part of an instruction in a named field, which makes them easy to template, store and send from code. One missing comma breaks them, though. This tool builds valid JSON prompts from plain fields and pinpoints the exact line and column when a pasted one won't parse.
Build mode turns form fields into a JSON object; validate mode parses your text with the browser's standard JSON parser.
Task is required. Role, context and output_format are added when filled. constraints and examples are always arrays, empty if you leave them blank.
Each line of Constraints becomes one array item. Examples are split on blank lines, so one example can span several lines.
The text is parsed with JSON.parse. If parsing fails, the tool converts the parser's character position into a line and column, counting from 1.
Valid JSON is printed again with your chosen indent, keeping key order, ready to copy.
Quotes, line breaks and special characters are escaped, so the output always parses.
Invalid input reports the line and column where parsing stopped, such as "line 3, column 3".
Write constraints one per line; they become a clean JSON array.
Reformat compact or messy JSON prompts with a 2 or 4-space indent.
Building and validating happen on your device. Nothing is uploaded.
Anyone who sends prompts from code or stores them as structured data.
Generate prompt payloads to drop into API calls, config files or tests.
Keep prompts for no-code and workflow tools in a predictable JSON shape.
Find the stray comma or unescaped quote that stops a JSON prompt from loading.
Store prompts with the same field names so they're easy to search and reuse.
Use the same keys, such as task and output_format, across all your prompts so code can rely on them.
A constraints array is easier to add to, remove from and review than one long string.
JSON doesn't allow a comma after the last item in an object or array. It's the most common parse error.
If you want a JSON answer, describe its keys and types in output_format.
A prompt written as a JSON object, with each part in its own field: for example role, task, context, constraints, output_format and examples. Models read it like any other text, and code can build or edit it easily.
Yes. Models such as GPT, Claude and Gemini read JSON fluently. The structure doesn't change what a model can do, but it makes each instruction explicit and easy to find.
The browser's JSON parser reports either a character position or a line and column. The tool converts a position into a line and column, both counted from 1. For text that ends too early, it points to the end of the input.
The usual causes are a trailing comma, single quotes instead of double quotes, an unquoted key, or a comment. Standard JSON allows none of these.
Empty role, context and output_format fields are left out. constraints and examples are always included as arrays, so code that reads them doesn't need a missing-key check.
No. Everything runs in your browser. The text you type is never stored or sent to a server.