{
  "slug": "php-unserialize",
  "name": "gizza-ai/php-unserialize",
  "version": "0.1.0",
  "title": "PHP unserialize() to JSON Converter — gizza.ai",
  "description": "Decode a PHP serialize() string to readable JSON in your browser. Inspect PHP sessions and WordPress wp_options values. Free, private, no sign-up.",
  "tags": [
    "php unserialize",
    "php to json",
    "serialize",
    "php session",
    "wordpress options",
    "serialized array",
    "php array",
    "deserialize"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/php-unserialize/",
    "markdown": "https://gizza.ai/tools/php-unserialize/index.md",
    "descriptor": "https://gizza.ai/tools/php-unserialize/tool.json",
    "deep_link_example": "https://gizza.ai/tools/php-unserialize/?serialized=a%3A2%3A%7Bs%3A4%3A%22name%22%3Bs%3A2%3A%22Al%22%3Bs%3A3%3A%22age%22%3Bi%3A30%3B%7D"
  },
  "cli": "gizza tool php-unserialize 'a:2:{s:4:\"name\";s:2:\"Al\";s:3:\"age\";i:30;}'",
  "tool": {
    "description": "Decode a PHP serialize() string (as produced by PHP's serialize(), or read from a PHP session, cache, or WordPress wp_options row) into readable JSON. Mapping: 'N;' -> null, 'b:1;'/'b:0;' -> true/false, 'i:N;' -> integer, 'd:N;' -> number, 's:<byte-len>:\"...\";' -> string (length is in bytes), 'a:<count>:{...}' -> a JSON array when keyed by the sequential integers 0..n, otherwise a JSON object, and 'O:<len>:\"Class\":<count>:{...}' (a serialized object) -> a JSON object with the class name under a '__class' field. Output is pretty-printed JSON. Use this to inspect PHP-serialized data from a non-PHP system; the inverse of php-serialize.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "serialized": {
          "description": "The PHP serialize() string to decode, e.g. 'a:1:{s:4:\"name\";s:2:\"Al\";}'. Supports all PHP serialize types: N (null), b (bool), i (int), d (double), s (string, byte-length), a (array) and O (object). The result is rendered as pretty-printed JSON.",
          "type": "string"
        }
      },
      "required": [
        "serialized"
      ],
      "type": "object"
    }
  }
}