JSON to HTML Table Converter
Clean, escaped HTML table markup from JSON — flat columns or nested tables.
A PHP array literal, var_export or print_r output turned into JSON — nothing executed.
Drop a PHP file here, or click to choose one
Converted on your device — the file is never uploaded
The PHP Array to JSON Converter parses PHP array literals, var_export output and print_r output into JSON, keeping types, without executing a single line of PHP.
You are debugging, or reading someone else’s config, and what you have is a PHP array — in a config file, dumped by var_export(), or printed by print_r() in a stack trace. Getting it into a form your tools can read normally means running PHP, which you cannot always do and should never do with code you do not trust.
Paste it here and get JSON, with nothing executed. Array literals with [] or array(), var_export output, and print_r output are all read. Single and double-quoted strings, heredocs, integers in hex, octal and binary, floats, booleans and null all keep their types. Arrays with keys 0, 1, 2 … become JSON arrays and any other keys become objects — exactly what json_encode would do. Function calls such as env('DB_HOST', '127.0.0.1') cannot run in a browser, so they resolve to their default argument, and constants become their names.
[] and array() literals, var_export output, and print_r output.
Hex, octal and binary integers, floats, booleans, null and heredocs all survive.
The text is parsed, never run, so an unknown config file is safe to paste.
A call such as env('DB_HOST', '127.0.0.1') becomes its default value.
Keys 0, 1, 2 … become a JSON array — exactly what json_encode would produce.
A literal, a whole config file with return [ … ];, or print_r output.
JSON arrays for sequential keys, or objects throughout.
Use the default argument, as Laravel config does, or write null.
Indented, minified, or with non-ASCII escaped.
No. The text is parsed, never run, so pasting a config file from an unknown source is safe. That is also why env() and other calls cannot be evaluated.
Yes, including nested arrays and objects. Be aware print_r loses types — every value comes back as a string — so use var_export or the literal when types matter.
Each call becomes its default argument, which is the value the app uses when the environment variable is not set. Switch to null if you would rather see which keys are dynamic.
Because its keys are not 0, 1, 2 … in order. PHP has one array type for both lists and maps; JSON does not, so non-sequential keys must become an object.
What people who use the PHP Array to JSON Converter think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the PHP Array to JSON Converter. It takes half a minute and no account.
Write the first reviewClean, escaped HTML table markup from JSON — flat columns or nested tables.
Turn subtitles into a readable transcript — no numbers, no timestamps.
Convert Matroska video to MP4 for phones, smart TVs and editors.
Today’s Hijri date — or any date’s — in English, Arabic and Bangla.
Turn a web page or rich text into BBCode a forum will accept.
RGB to HSV/HSB and back — the model colour pickers actually use.
Convert glucose between mg/dL and mmol/L, and HbA1c between % and mmol/mol.
Turn a photo into a GIF, with the palette built from the image itself.