PHP Serialize / Unserialize

Convert JSON to PHP serialize strings and back — UTF-8 safe, arrays and objects supported.

JSON

0 chars · 0 bytes

PHP serialize

Converts as you type

Usage guide

Convert between JSON and PHP serialize strings. UTF-8 byte lengths are matched to PHP's expectations.

  • Result updates instantly as you type — no button needed.
  • Empty JSON arrays become a:0, empty objects become stdClass — round-trip preserved.
  • Class objects use the __php_class key; quoted strings are read by length.
  • A serialize string pasted into Serialize mode auto-unserializes.

How to use

Paste JSON to get a PHP serialize string, or paste serialized data to get JSON — converts instantly with UTF-8 byte-length matching.

Frequently asked

Are objects supported?
Yes — objects become stdClass or use __php_class keys.
Does it handle Unicode?
Yes — string lengths use UTF-8 bytes exactly like PHP.
Is my data uploaded?
No — everything runs locally in your browser.
php serializephp unserializeserialize converterJSON to PHP serialize

Related tools