JSON Escape
Escape or unescape strings for safe JSON embedding. This is the only free endpoint — no API key needed.
POST /api/json-escape
Section titled “POST /api/json-escape”No authentication required. Rate limited per IP.
Accepts both application/json and application/x-www-form-urlencoded.
JSON parameters
Section titled “JSON parameters”| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | escape or unescape |
input | string | Yes | The string to process |
Form parameters
Section titled “Form parameters”Same fields as form values (mode and input).
Response (JSON mode)
Section titled “Response (JSON mode)”{ "output": "hello \\\"world\\\"", "mode": "escape"}Response (form mode)
Section titled “Response (form mode)”Plain text body with the result string.
Examples
Section titled “Examples”Escape (JSON):
curl -X POST https://morso.dev/api/json-escape \ -H "Content-Type: application/json" \ -d '{"mode": "escape", "input": "hello \"world\"\nnew line"}'{ "output": "hello \\\"world\\\"\\nnew line", "mode": "escape"}Unescape (form data):
curl -X POST https://morso.dev/api/json-escape \ -d "mode=unescape" \ -d "input=hello+%5C%22world%5C%22"Response body: hello "world"
- No
Authorizationheader needed. - Max body: 5 MB.