PHP Serialize / Unserialize

Convert JSON to PHP serialize() format or unserialize PHP strings to readable JSON, with correct UTF-8 byte lengths. Free online tool.

About this tool

Convert JSON to PHP serialize() format and unserialize PHP strings into readable JSON. Useful for inspecting WordPress options, sessions and cache values.

How to use

  1. Choose JSON → serialize() or serialize() → JSON.
  2. Paste the input.
  3. Copy the output.

Frequently asked questions

Why do string lengths matter?

s:N: counts UTF-8 bytes, not characters. The tool calculates byte lengths correctly for Korean and emoji.

How are PHP objects shown?

O:… objects become JSON objects with a "__class" key holding the class name.

Is it safe to unserialize untrusted data here?

Yes. The tool only parses the text and never runs PHP code.

Related tools