Skip to content

JSON Escape

Escape or unescape strings for safe JSON embedding. This is the only free endpoint — no API key needed.

No authentication required. Rate limited per IP.

Accepts both application/json and application/x-www-form-urlencoded.

FieldTypeRequiredDescription
modestringYesescape or unescape
inputstringYesThe string to process

Same fields as form values (mode and input).

{
"output": "hello \\\"world\\\"",
"mode": "escape"
}

Plain text body with the result string.

Escape (JSON):

Terminal window
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):

Terminal window
curl -X POST https://morso.dev/api/json-escape \
-d "mode=unescape" \
-d "input=hello+%5C%22world%5C%22"

Response body: hello "world"

  • No Authorization header needed.
  • Max body: 5 MB.