CTF

PHP Unserialize Viewer & Editor

Turn PHP serialize() data into editable JSON and re-serialize it with string lengths recomputed; handles URL- and Base64-encoded cookies.

Runs locallyYour input never leaves this device
WORKBENCH

2 MB input limit · no history kept

Objects use "__class__" for the class name; protected properties are named \u0000*\u0000name and private ones \u0000Class\u0000name. Re-serializing recomputes every string length in UTF-8 bytes, so hand edits can't break the s:length fields. Use only for authorized testing and CTFs.

HOW TO USE

How to use the PHP Unserialize Viewer & Editor

PHP deserialization bugs are a staple of web CTFs and penetration tests, and cookies or parameters often carry data like O:4:"User":…. Editing it by hand makes it easy to get the s: lengths wrong. This tool converts the data to order-preserving JSON, recomputes every length in UTF-8 bytes after you edit, and outputs URL- and Base64-encoded versions.

  1. Paste a serialize() string, or a URL- or Base64-encoded cookie value, and click Parse.
  2. Edit values in the JSON on the right — for example, set isAdmin to true.
  3. Click Re-serialize and copy the raw, URL-encoded or Base64 version back into your test.
USE CASES

PHP Unserialize Viewer & Editor use cases

  • Modify serialized user objects in cookies to test authorization logic.
  • See which classes a PHP payload contains to assess POP gadget risk.
  • Fix hand-edited data that no longer unserializes because of wrong lengths.

Related topics: php, unserialize, serialize, 反序列化, php object injection, cookie, web ctf

FAQ

PHP Unserialize Viewer & Editor FAQ

Does the PHP Unserialize Viewer & Editor upload my data?

No. Tool input and results stay in the current tab. Navigation may load static site assets, but does not upload the data you enter.

Is the PHP Unserialize Viewer & Editor free? Do I need an account?

It's free with no account and no usage limits, like every other tool on SecTools.

Can I use the PHP Unserialize Viewer & Editor on mobile or offline?

Yes. It works in mobile and desktop browsers and keeps working offline once the page has loaded. You can also self-host the open-source code on an internal network.

Can I treat the PHP Unserialize Viewer & Editor's results as a final verdict?

Use them for triage and cross-checking. For important incidents, keep the original evidence and confirm with your formal verification or forensic process.

SECURITY NOTE

Use it safely

This tool supports analysis and interpretation; it doesn't replace a formal security review. Avoid pasting live credentials, private keys or production passwords on a shared computer. Close the tab when you're done and your input is gone.