Multiline Prompt & Code to JSON String Escaper
Paste a multiline system prompt, code block, or API response and get a byte-safe JSON string literal — or decode an escaped string back into readable text. Everything runs locally in your browser.
Why does my multiline prompt break the API request?
JSON strings cannot contain raw line breaks, tabs, or unescaped double quotes. A prompt pasted straight into "content": "..." must have every newline turned into \n, every " into \", and every backslash doubled. This tool produces a guaranteed-valid literal, optionally with non-ASCII characters encoded as \uXXXX for strict or legacy transports.
Is my prompt uploaded anywhere?
No. Escaping, unescaping, and payload generation all happen in your browser with plain JavaScript. Nothing is sent to a server, logged, or stored — you can use this page offline once it has loaded.