{
  "slug": "json-escape",
  "name": "gizza-ai/json-escape",
  "version": "0.1.0",
  "title": "JSON Escape / Unescape — gizza.ai",
  "description": "Escape or unescape special characters in a string for safe use inside JSON — quotes, backslashes, newlines, control chars. Runs in your browser; nothing uploaded.",
  "tags": [
    "json escape",
    "json unescape",
    "escape string",
    "json string",
    "escape quotes",
    "unescape json"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/json-escape/",
    "markdown": "https://gizza.ai/tools/json-escape/index.md",
    "descriptor": "https://gizza.ai/tools/json-escape/tool.json",
    "deep_link_example": "https://gizza.ai/tools/json-escape/?text=He%20said%20%22hi%22%0ALine%20two&mode=escape&quotes=true"
  },
  "cli": "gizza tool json-escape 'He said \"hi\"\nLine two'",
  "tool": {
    "description": "Escape or unescape special characters in a string for safe use inside JSON. mode=escape (default) turns raw text into a JSON-safe string body (escaping quotes, backslashes, newlines, tabs, and control chars as \\uXXXX); set quotes=true to also wrap it in double quotes. mode=unescape reverses it, accepting input with or without surrounding quotes. Uses a spec-correct JSON codec. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "mode": {
          "default": "escape",
          "description": "escape = make the text safe inside a JSON string; unescape = turn a JSON-escaped string back to raw text.",
          "enum": [
            "escape",
            "unescape"
          ],
          "type": "string"
        },
        "quotes": {
          "default": false,
          "description": "Escape mode only: also wrap the result in surrounding double quotes.",
          "type": "boolean"
        },
        "text": {
          "description": "The string to escape or unescape.",
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "type": "object"
    }
  }
}