Supports arrays, objects, strings, int, float, bool, NULL
Ready to format
Paste var_dump output and click Format Dump// turn messy var_dump output into a readable tree
Paste raw PHP var_dump output and get a clean, color-coded, collapsible tree view. Free browser-based tool, no sign-up required.
Supports arrays, objects, strings, int, float, bool, NULL
Ready to format
Paste var_dump output and click Format DumpRun your PHP script and copy the raw var_dump() text from your browser or terminal.
Paste into the input box. Choose whether to expand all nodes by default.
Get a color-coded, collapsible tree. Click any array or object node to expand or collapse it.
PHP's built-in var_dump() function outputs raw, hard-to-read text when you dump arrays or nested objects. This tool parses that raw output and renders it as an interactive, color-coded tree — making it effortless to inspect deep data structures during debugging.
It supports all PHP primitive types: string, int, float, bool, and NULL. It also supports compound types: indexed and associative array, and PHP object with class name and properties.
No. All parsing and rendering happens entirely in your browser using JavaScript. Your var_dump output never leaves your machine. This makes the tool safe for sensitive debugging data.
This tool is specifically designed for var_dump() syntax, which includes type annotations like string(5) or int(42). For print_r() or var_export() output, a JSON Formatter may be a better fit after converting to JSON.
The tool handles large dumps efficiently. Use the "Collapse all" button to get a high-level overview, then expand only the nodes you need to inspect. This keeps the UI fast even with thousands of array entries.
var_dump() shows the exact type and length of each value, which makes it more precise for debugging. print_r() omits type information. For production debugging, var_dump() is generally preferred when you need to verify types.
Yes. Click any array or object header in the tree to toggle its children. Use the "⊞ All" and "⊟ All" buttons to expand or collapse the entire tree at once. The initial state is controlled by the "Expand all by default" checkbox.
Yes — deeply nested structures are fully supported. The tree renders with proper indentation for each level, making it easy to trace paths through complex hierarchies like configuration arrays or ORM result objects.
"Copy Raw" copies the original var_dump text you pasted in, not the formatted tree. This is useful when you want to share the raw output with a colleague or paste it into a bug report.
A PHP var_dump formatter is a developer tool that takes the raw text output produced by PHP's built-in var_dump() function and transforms it into a readable, interactive display. When you call var_dump($variable) in PHP, the language prints a detailed description of the variable's type and value directly to the browser or terminal. While this raw output is technically complete, it quickly becomes overwhelming when inspecting large arrays, deeply nested structures, or complex objects with dozens of properties.
This formatter solves that problem by parsing the raw output and rendering it as a color-coded, collapsible tree — similar to how modern browser DevTools display JSON data. Each data type gets its own color, nested nodes can be expanded or collapsed individually, and stats like the total number of keys and nesting depth are shown at a glance.
Despite the existence of powerful IDEs and Xdebug integrations, var_dump() remains one of the most common debugging tools in PHP development. It requires no configuration, no extension, and no browser plugin. You call it inline, it prints, and you read the output. This simplicity makes it a go-to choice for quick checks during development — especially in legacy codebases, shared hosting environments, or when debugging issues in production where a full debugger isn't available.
The function shows not just the value but also the type (int, string, bool, etc.) and the exact byte length of strings. For arrays and objects, it recurses into every nested level, printing each key and value with proper indentation. This level of detail is genuinely useful — but the formatting becomes nearly unreadable once you have more than a couple of nesting levels.
The formatter uses a recursive parser written in JavaScript that reads var_dump's structured syntax line by line. It identifies type tokens like array(N), object(ClassName)#id (N), string(N), int(N), float(N), bool(true|false), and NULL. Each token is mapped to a corresponding tree node, and the nodes are rendered as nested HTML elements with click-to-toggle behavior.
Because all processing happens in your browser, nothing is ever sent to a remote server. This matters for developers working with sensitive data like database query results, authentication tokens embedded in objects, or internal configuration arrays.
PHP var_dump follows a consistent syntax that makes it machine-parseable. Here's what each line means:
Array keys are shown with [key]=> before each value. String keys are quoted: ["username"]=>. Integer keys are unquoted: [0]=>. Objects show their properties similarly, with an additional ["propName":"ClassName":private]=> format for non-public properties.
For the formatter to parse correctly, your var_dump output should be raw text — not HTML-rendered. When you run PHP in a browser, the output may be collapsed by whitespace and have HTML entities. To get clean text, either:
<pre><?php var_dump($x); ?></pre> to preserve whitespace in the browser, then copy the visible textphp -r "var_dump($x);" for pure text outputob_start(); var_dump($x); $out = ob_get_clean(); to capture the output as a stringWhile var_dump is excellent for quick inspection, there are cases where other tools make more sense. print_r() is more human-readable but omits type information. var_export() produces PHP-parseable output, useful for generating configuration. Libraries like Symfony's VarDumper (the basis for dd() in Laravel) produce rich, styled HTML output directly in the browser with built-in collapsing — but require a dependency. This tool gives you the same readable experience for raw var_dump text, with no dependencies or framework required.
Modern PHP applications often deal with deeply nested data: ORM result sets, deserialized JSON API responses, configuration arrays, or Symfony/Laravel request objects. Dumping these structures with var_dump can produce hundreds or thousands of lines. The formatter's collapsible tree lets you start at the top level — seeing just keys and counts — and drill down only into the branches that interest you. This dramatically reduces the cognitive load of debugging in complex codebases.
The color coding also helps: strings appear in one color, integers in another, booleans as distinct badges, and NULL values are visually distinct. At a glance, you can spot type mismatches — a field that should be an integer but came through as a string, or a boolean that's unexpectedly null — before reading a single value.