Made in / Donate

Data format converter

Convert between JSON, XML, CSV, query strings and PHP's own formats (array code, var_dump(), print_r(), serialize()) in any direction. Turn a dump from a log into JSON, a WordPress option into something readable, or an API response into a PHP array for a test. PHP input is read, never run.

[
    'name' => 'Ada',
    'age' => 36,
    'admin' => true,
    'langs' => [
        'PHP',
        'SQL',
    ],
    'address' => [
        'city' => 'London',
        'zip' => null,
    ],
]
  • PHP array input takes literals only (arrays, strings, numbers, true/false/null, (object)), as var_export() writes them.
  • serialize() input is read without unserialize(). Wrong string lengths, which a database search-and-replace leaves in WordPress options, are repaired: convert serialize() to serialize() to fix them.
  • print_r() and CSV have no types, so numbers like 42 and 1.5 become numbers and everything else stays text. print_r() prints true as 1 and false/null as nothing.
  • CSV: the first row names the columns, and the delimiter (comma, semicolon, tab or pipe) is detected. Nested values are written into their cell as JSON.
  • Query string: paste a=1&b[]=2 or a whole URL. Values are text, as $_GET sees them.
  • XML attributes appear under @attributes, and repeated elements become a list. Objects of any class in a dump come back as plain objects.

Data you share is sent to our server for processing. No guarantee; use at your own risk — see the privacy policy.