Home/Tools/PHP Serialize Online

PHP Serialization Tools

PHP Serialize Online

Convert simple JSON values into PHP serialized strings for testing and debugging.

PHP serialized string

a:2:{s:4:"name";s:3:"Ada";s:3:"age";i:37;}

Use this converter to produce simple PHP serialized strings from JSON-shaped test data.

When it helps

This is useful when creating fixtures, reproducing cache data, or learning how PHP serialization encodes types.

PHP example

echo serialize(['name' => 'Ada', 'age' => 37]);

Common mistakes

String lengths in PHP serialization count bytes, not characters. Non-ASCII text can make manual serialization fail.

FAQ

What input does this tool accept?

The first version accepts JSON objects, arrays, strings, numbers, booleans, and null.

Will the output match PHP exactly?

It is designed for common UTF-8 test data. Validate critical payloads in PHP.

Related tools

Related guides