⚡ WordPress · Client-side · No data sent to server

Serialized Data Fixer

After a database search-replace, PHP serialized strings break because their s:N: byte-length prefixes no longer match. Paste the broken data to recompute every length. Everything runs in your browser, and nothing is uploaded.

Waiting for input… ✓ Copied!
100% private. Every s:N:"…" token is re-measured using accurate UTF-8 byte lengths, entirely in your browser. Nothing is uploaded or logged.

About the Serialized Data Fixer

The Serialized Data Fixer repairs broken PHP serialized data, the kind that gets corrupted after a database search-and-replace during a WordPress migration. When you change a domain or path, the s:N: byte-length prefixes inside serialized strings no longer match the new string lengths, which silently breaks widgets, theme options, and plugin settings. This tool recomputes every length prefix correctly so your serialized data is valid again, saving WordPress developers from hunting down corrupted options by hand.

How it works

  1. Paste your broken PHP serialized data into the input box (or click Load example to see a sample).
  2. Click Fix to recompute every s:N: byte-length prefix to match its actual string content, multibyte/UTF-8 safe.
  3. Copy the repaired result and paste it back into your database, then use Clear to start over.

Features

  • Recomputes every s:N: length prefix accurately, even for multibyte and UTF-8 characters.
  • Runs 100% in your browser, so your data is never uploaded to a server.
  • Handles nested arrays and objects within the serialized structure.
  • One-click Fix, Copy, Load example, and Clear buttons for a fast workflow.
  • Completely free with no signup, accounts, or tracking.

Frequently asked questions

What causes broken serialized data?

It usually happens after a raw database find-and-replace, such as changing a site URL or domain. PHP serialized strings store their byte length as an s:N: prefix; when the string text changes length but the prefix does not, the data becomes invalid and WordPress can no longer read it.

Why not just use a SQL find-and-replace?

A plain SQL or text find-and-replace changes the string content without updating the s:N: byte-length prefixes that precede each serialized string. The result is serialized data whose declared lengths no longer match, which corrupts widgets, theme settings, and plugin options.

How do I avoid this in the future?

Use a serialization-aware tool when changing values across a WordPress database. WP-CLI's `wp search-replace` command and reputable migration plugins parse and re-serialize the data correctly, updating the length prefixes automatically so nothing breaks.

Is my data uploaded anywhere?

No. The fixer runs entirely in your browser using client-side JavaScript. Your serialized data never leaves your device and is not sent to any server.

What does s:N: mean in serialized data?

In PHP serialization, a string is stored as s:N:"value"; where N is the byte length of the value. For example, s:5:"hello". If N does not exactly match the byte length of the value, PHP treats the data as invalid, which is the core problem this tool fixes.