What is PHP Serialized Data Decoder?
PHP serialization converts PHP values into a string representation that can be stored or transferred and later reconstructed. You may encounter serialized values in legacy databases, cache entries, session data, or application debugging. Because native PHP unserialization can instantiate objects, unknown serialized input must be treated carefully.
What can you use it for?
- Inspect simple serialized values copied from a development database.
- Understand the structure of a serialized PHP array.
- Convert supported scalar and array data into readable JSON for debugging.
- Check whether a value contains a type that this safe parser deliberately does not support.
How to use this tool
- Copy a serialized value from a trusted development or debugging source.
- Paste it into the input field and select Decode data.
- Review the JSON representation if the value contains only supported types.
- If the parser rejects an object or reference, inspect it in a controlled PHP environment using trusted data and appropriate safeguards.
Example input
This example represents an associative PHP array with a name string and an integer count.
a:2:{s:4:"name";s:8:"Info4PHP";s:5:"count";i:5;}
Tips and things to know
- The parser supports null, booleans, integers, floats, strings, and arrays.
- PHP objects, custom-serialized objects, and references are intentionally rejected.
- String lengths in PHP serialization are byte lengths, so multibyte text must be handled carefully.
- This tool is a debugging aid, not a replacement for validating data in the application that produced it.
Frequently asked questions
Why are PHP objects not decoded?
Object deserialization can have security implications. This browser parser intentionally rejects objects and references and never calls PHP unserialize().
Why might a serialized string containing Turkish characters fail?
PHP serialized string lengths count bytes, not visible characters. If the stored byte length does not match the UTF-8 input, parsing can fail.
Does this tool run PHP code?
No. It is a JavaScript parser for a limited set of serialized data types. It does not execute PHP code or instantiate PHP classes.