Back to Tools

PHP Serialize / Unserialize

PHP Serialize / Unserialize

Convert PHP objects and arrays into serialized strings and back

PHP Tool
Input Data
Result

                

About the PHP Serialize / Unserialize

Convert PHP serialized strings to readable JSON and back.

How to use the PHP Serialize / Unserialize

  1. Paste your code into the input box, or click Load Sample to load an example.
  2. Choose Unserialize (to JSON/Readable) or Serialize (from JSON/Object) as the Action.
  3. Press Convert.
  4. Use Copy (or Download where shown) to keep the result. Clear empties the box.

Worked example

a:1:{s:1:"a";i:1;} is the serialised form of the array ['a' => 1].

Tips

  • Never unserialize data from untrusted sources in your own code, as it can be unsafe.

Frequently Asked Questions

Untrusted serialized data can trigger unexpected code. Prefer JSON for data from users.
Live Support
We usually reply within minutes

Enter your name to start a conversation with our team.