PHP Serialize & Unserialize Online — Free Serializer Tool
Serialize and unserialize PHP data instantly with our free online tool. Convert between PHP serialized format and JSON, edit serialized data safely, and debug WordPress or Laravel cache values. All processing happens in your browser — no data sent to any server.
Basic example
Input JSON data
Serialized PHP data
Serialization options
Comparison with/without option:
Original code
With includeNullValues: true
With includeNullValues: false
Difference
Comparison with/without option:
Original code
With removeEmptyArrays: true
With removeEmptyArrays: false
Difference
Comparison with/without option:
Original code
With removeEmptyObjects: true
With removeEmptyObjects: false
Difference
Comparison with/without option:
Original code
With sortKeys: true
With sortKeys: false
Difference
Features
Our PHP serialization tool offers a complete set of features for working with PHP serialized data.
Convert JSON data structures into PHP serialized format instantly. Supports arrays, objects, strings, numbers, booleans and null values.
Decode PHP serialized strings back into readable JSON data. Restore original data structures from serialized format for debugging and analysis.
Seamlessly convert between PHP serialized format and JSON. Ideal for migrating data between PHP applications and modern APIs.
How to Unserialize PHP Data Online
PHP unserialization converts a serialized string back into its original PHP data structure. With FastMinify, you can unserialize PHP data directly in your browser — no server required. Simply paste your serialized PHP string in the left editor, and the tool automatically detects and decodes it. This is especially useful for debugging WordPress options, session data, or cached values stored in PHP serialized format.
PHP Serialize vs JSON — When to Use Which
PHP's serialize() format preserves type information including objects and references, while JSON is a universal interchange format. Use PHP serialization when working within PHP ecosystems (WordPress, Laravel, session storage). Use JSON when you need interoperability with JavaScript, APIs, or other languages. Our tool lets you convert between both formats with a single click using the JSON tool.
Editing Serialized PHP Data
Manually editing PHP serialized strings is error-prone because the format includes string length prefixes. Changing a single character can corrupt the entire structure. FastMinify solves this by unserializing to JSON, letting you edit the human-readable version, then re-serializing with correct lengths automatically.
Frequently Asked Questions
Everything you need to know about PHP serialization and unserialization
Why serialize PHP data?
PHP serialization converts complex data structures like arrays and objects into a compact string format for storage in databases, sessions, or cache. It preserves PHP-specific type information that JSON cannot represent, such as object classes and references.
How does PHP serialization work?
PHP's serialize() function encodes data with type prefixes and string length markers. For example, a string becomes s:5:"hello" where s indicates the type and 5 is the length. Arrays and objects are recursively serialized with their keys and values.
Can I unserialize PHP code online?
Yes, paste any PHP serialized string into our tool and it will decode it into readable JSON format. This works for arrays, objects, strings, numbers, booleans and null values. All processing happens in your browser for complete privacy.
Is my code processed securely?
Absolutely. All serialization and unserialization happens entirely in your browser using JavaScript. No data is ever sent to our servers, ensuring complete privacy and security for sensitive data.
What is the difference between PHP serialize and JSON?
PHP serialize preserves PHP-specific types (objects, class names, references) while JSON is a universal format. JSON is more portable across languages, but PHP serialization retains more type information. Use our tool to convert between both formats instantly.
Can I edit serialized PHP data?
Yes, our tool makes it easy. Paste the serialized string, let it decode to JSON, modify the data in the editor, then re-serialize. The tool handles string length calculations automatically, preventing corruption.
Is PHP unserialize safe?
In PHP applications, unserialize() can be dangerous with untrusted input due to object injection attacks. However, our browser-based tool processes data safely in JavaScript without executing any PHP code.
Can I serialize PHP arrays and objects?
Yes, our tool handles PHP arrays (both indexed and associative), objects, nested structures, strings, integers, floats, booleans, and null values. Enter your data as JSON and the tool converts it to valid PHP serialized format.