Encode / Decode

PHP Unserializer

Paste a PHP serialize() string and get readable JSON back. If you've ever looked at a WordPress wp_options table or a Drupal variables table and seen strings like a:2:{s:4:"name";s:3:"Ada";s:5:"email";s:16:"ada@example.com";}, this tool turns that into clean JSON you can actually read and work with.

PHP Unserializer — Decode PHP serialize() strings into readable JSON

What it does

  • Parses PHP serialize() format into JSON
  • Handles strings (s:), arrays (a:), integers (i:), doubles (d:), booleans (b:), and null (N;)
  • Recursively decodes nested arrays and values
  • Reports the position and context of malformed input

Use cases

  • Reading a serialized value from a WordPress or Drupal database
  • Debugging a PHP application's stored configuration
  • Migrating data from a PHP application to a JSON-based system
  • Inspecting what's actually stored in a serialized session or cache value

How it works

1

Paste your PHP serialize() string into the input pane

2

The tool parses the format, reading type prefixes and length indicators

3

The decoded structure is output as formatted JSON

4

Copy the JSON for analysis or use in another tool

Frequently asked questions

1Does it handle PHP objects (O:...)?

The unserializer focuses on arrays and primitive values, which cover the vast majority of real-world serialized data. PHP objects with class names require class context to fully reconstruct, so they're handled as arrays with their properties.

2What if my serialized string is malformed?

The tool reports an error with the position where parsing failed, so you can find the issue. Common problems are truncated strings (the length prefix says 20 but there are only 15 bytes) or missing semicolons between values.

3Can it handle serialized data from WordPress?

Yes. WordPress stores plugin settings, widget configurations, and post metadata as PHP serialize() strings. Paste any of those values and the tool converts them to readable JSON.

Related tools

Use PHP Unserializer offline in Devinity

All 95 tools run locally on your Mac. No internet required, no data sent to servers.

Download Devinity →