Skip to main content

PHP Deserializer

Deserialize PHP's serialize() output into readable JSON. Paste a serialized PHP string or upload a file to unserialize arrays, objects, and scalars.

Input

Drop a file or browse
One file · text
Or

Output

Result JSON
 
Was this helpful?

Guides

Convert PHP's serialize() output back into readable, indented JSON — useful for inspecting serialized values pulled from a database column, a WordPress wp_options row, or a cache file, without spinning up PHP.

How to use it

  1. Paste a serialized PHP string into the input box, or upload a .txt file containing one.
  2. The deserialized value is shown as formatted JSON on the right, updating as you type.
  3. Copy or download the result.

What gets parsed

All of PHP's native serialized types: arrays (a:), objects (O:), strings (s:), integers (i:), floats (d:), booleans (b:), and null (N;).

  • A PHP array with sequential integer keys starting at 0 becomes a JSON array; any other array (string keys, or gaps) becomes a JSON object.
  • A PHP object becomes a JSON object with __className and __isObject: true alongside its properties, since JSON has no native concept of a class name.
  • A serialized string nested inside another serialized value (a value that was itself serialize()d before being stored) is unwrapped recursively.

What if the data is invalid?

If the input isn't well-formed PHP serialization, the tool returns your original input unchanged rather than throwing an error.

Privacy

Everything runs entirely in your browser. Your data is never uploaded to a server.

phpunserializedeserializejsonconverter

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/php-deserializer \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "serializedPhpData": "a:3:{i:0;s:5:\"Apple\";i:1;s:6:\"Banana\";i:2;s:6:\"C…"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `php-deserializer` tool (PHP Deserializer) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.