Code / FREE ONLINE TOOL
PHP Unserialize & Serialized Data Fixer
Decode PHP serialized data to JSON or var_export() online, repair broken string lengths after a database search and replace, and convert JSON to PHP serialize() format.
QUICK GUIDE
How to use this tool
Paste a value from wp_options, post meta or an SQL dump. Fix lengths recalculates s:N byte lengths and element counts, also inside serialized data nested in strings, and leaves everything else unchanged. Encode JSON produces serialize() output; an object key "__class" becomes a PHP object. Integers beyond 2^53 are kept exactly when decoding, not when encoding.
Your input is processed locally. Use Copy or Download to keep your result.
Keep your workflow moving
Need another step? Try a related tool.