PHP unserialize online

PHP unserialize reads strings produced by serialize() and rebuilds the arrays and values; this tool shows them as JSON.

Features

  • No code executionThe text is parsed; no PHP objects are created.
  • Byte-accurate stringsLengths are counted in UTF-8 bytes, as PHP does.
  • Runs on your deviceYour data is processed in the browser and is never uploaded.

How to use the PHP unserializer

  1. Paste the serialized value.
  2. Read the JSON.
  3. Copy what you need.

Why edits break serialized data

Each string stores its byte length. Changing text without changing the number makes the whole value unreadable, a common problem after search-and-replace in WordPress databases.

The same in PHP

$value = unserialize($data, ['allowed_classes' => false]);
echo json_encode($value, JSON_PRETTY_PRINT);

Frequently asked questions

Are objects supported?

Yes. The class name appears as __class.

Are references supported?

No.

Why does it report an invalid byte?

A length does not match its string, often after manual editing.

Related tools