PHP Serialize / Unserialize

Convert JSON to PHP serialized format and back.

About the PHP Serialize / Unserialize

PHP's serialize() format shows up in WordPress options, session data, and legacy database columns, and it is awkward to read by hand. The AlarmDaddy PHP Serialize / Unserialize tool converts between readable JSON and PHP's serialized string format in both directions, in your browser.

Paste JSON and convert it to a PHP serialized string, or paste a PHP serialized string to turn it into clean, readable JSON. It supports strings, numbers, booleans, null, arrays and nested objects — the structures you actually hit when debugging WordPress meta or PHP sessions.

How to use this calculator

  1. 1Choose JSON → PHP or PHP → JSON.
  2. 2Paste your JSON or PHP serialized string.
  3. 3Read the converted output.
  4. 4Copy the result with one click.

The formula

PHP serialize encodes type and length: s:5:"hello"; i:42; a:2:{...}.

PHP's format prefixes each value with its type and, for strings and arrays, a length or count: s for string, i for integer, d for double, b for boolean, a for array. The tool parses these tokens to rebuild the value, or emits them from your JSON.

Frequently asked questions

Strings, integers, floats, booleans, null, arrays and nested objects — covering the vast majority of WordPress option and PHP session payloads.