PHP Unserializer
Inspect PHP serialized values safely without executing PHP code
Serialized Input
0 B · Up to 5 MB. Inputs over 256 KB parse when you select Unserialize.
Results
Restoring your last input…
Parsed as text in your browser. No PHP code runs and no classes are created. Input up to 256 KB is saved in this browser; Clear removes it.
Related Tools
How to use
- 1.Paste a serialized value or choose Load Example.
- 2.Input up to 256 KB is parsed as you type; larger input waits for Unserialize.
- 3.Browse the Tree, or switch to JSON, print_r or var_dump.
- 4.Select a reference to jump to the value it points to.
- 5.Copy or download the current output.
PHP Unserializer
PHP Unserializer reads values written by PHP serialize(), such as WordPress options and transients, sessions, cache entries and queue payloads, and shows them as a tree, JSON, print_r or var_dump. It is a parser, not a PHP runtime: nothing is executed, no class is instantiated and no magic method such as __wakeup or __unserialize runs, so it is safe for untrusted data.
Lengths, references and visibility
String lengths are UTF-8 byte lengths, so s:4:"😀"; is valid and a length broken by a charset conversion is reported with its byte offset. Values are numbered in serialization order starting at 1; r:n; and R:n; point to those numbers and are shown as links instead of copies, so circular structures stay finite, and print_r and var_dump print *RECURSION* like PHP. Protected and private property names are decoded from their NUL-marked form.
Limits and privacy
Input is limited to 5 MB, 512 nesting levels and 200,000 values, and the tree shows the first 2,000 rows. C: custom serialized payloads are shown as raw text. JSON cannot represent every PHP value, so the JSON view follows the conventions described next to it. Processing happens in your browser; input up to 256 KB is saved locally and Clear removes it.
Frequently asked questions
- Is it safe to paste untrusted serialized data?
- Yes. The tool parses the serialize() grammar as text in your browser. It never executes PHP, never creates class instances and never calls __wakeup, __destruct or __unserialize, so PHP object-injection payloads are only displayed, not run. Nothing is uploaded.
- Why does it say the declared string length does not match?
- PHP stores string lengths in UTF-8 bytes. If a value was edited by hand, changed by a database search-and-replace or converted to another charset, the declared length no longer matches the bytes. The error shows the byte offset, the line and column, a short excerpt and the actual byte length so you can fix the s:<length> prefix.
- Can I convert PHP serialized data to JSON?
- Yes. Switch to the JSON view and copy or download it. Sequential integer-keyed arrays become JSON arrays, other arrays become objects, objects include a "__class" key, references become {"$ref": "#n"}, and big integers keep their exact digits.
