Skip to main content
Programming Language Tools

PHP var_dump Formatter

Paste raw PHP var_dump() output and get it displayed in a clean, readable, indented format.

Paste raw var_dump() output below - this tool reformats it with consistent, readable indentation.

For PHP's serialize()/unserialize() format specifically (a different output format from var_dump), see the PHP Serialized Data Decoder.

What Is var_dump Output?

var_dump() is PHP's built-in function for inspecting a variable's type and value - its output nests deeply for arrays/objects but isn't always cleanly indented, especially when copied from a terminal or log file that's stripped formatting.

Why Use This Tool?

var_dump output copied from a browser page, log file, or terminal often loses its original indentation - this tool re-parses the structure and re-indents it consistently for easier reading.

How to Use It

  1. Paste raw var_dump() output.
  2. Click Format.
  3. Review the cleanly re-indented structure.

Limitations

This handles the common var_dump output format for arrays, strings, integers, floats, booleans, and null - PHP object dumps with many custom properties are parsed on a best-effort basis.

Frequently Asked Questions

Copied from a terminal or log, it often loses its indentation, so nested arrays and objects run together. The formatter restores the structure.

It is designed for var_dump() format with type information such as string(5) "hello". print_r output uses a different layout.

No. Formatting happens in your browser, which matters because debug output often contains private data.
Share this tool: