0 bytes
Output

About the PHP Unserializer

PHP's serialize() function converts variables into a storable string representation. This is a common format in PHP applications — you'll encounter it in database rows, session files, cookies, cache stores, and log files. Manually reading a serialized string is tedious; this tool parses it instantly and displays the data in a clean, readable tree.

Supported input formats

PHP serialization format reference

Privacy

All parsing runs locally in your browser using JavaScript. No data is transmitted to any server — safe to use with production database dumps, session data, or any sensitive content.

Frequently Asked Questions

What is PHP serialization?
PHP serialization converts a PHP variable (array, object, string, integer, etc.) into a storable string representation using PHP's serialize() function. The format encodes the type, length, and value of each element. For example, a string 'hello' becomes s:5:"hello"; and an array becomes a:N:{...} where N is the element count.
Does this tool run on a server?
No. The PHP unserializer runs entirely in your browser using JavaScript. Your data is never sent to any server, which makes it safe to use with sensitive or production data.
Can it handle Base64-encoded serialized strings?
Yes. The tool automatically detects Base64-encoded input and decodes it first before attempting to unserialize. This handles the common pattern where PHP serialized data is Base64-encoded before being stored in cookies or databases.
What types does PHP serialization support?
PHP's serialize() supports strings (s), integers (i), floats (d), booleans (b), null (N), arrays (a), and objects (O). This tool parses and displays all of these types with colour-coded highlighting.
What is the difference between PHP serialize and JSON?
PHP serialize is PHP-specific and can represent PHP objects including class names, whereas JSON is a language-agnostic format. JSON is more portable and widely supported, while PHP serialization is faster within PHP applications and preserves more type information. This tool handles both formats.
Text & Dev tools
Ad