PHP Beautifier

PHP Beautifier Online


PHP Formatter helps to format unformatted or ugly PHP data and helps to save and share PHP.

What can you do with PHP Formatter?

  • It helps to beautify your PHP.
  • This tool allows loading the PHP URL to beautify. Click on the URL button, Enter URL and Submit.
  • This tool supports loading the PHP File to beautify. Click on the Upload button and select File.
  • PHP Beautifier Online works well on Windows, MAC, Linux, Chrome, Firefox, Edge, and Safari.

Example of PHP

PHP data Try it.

class CarInsurance
    public $id;
    public $name;

    public function __construct($id, $name)
        $this->id = $id;
        $this->name = $name;
    public function message()
        return "My Car Insurance's ID is " .
            $this->id ." and Name is " . $this->name . "!";

$myCarInsurance = new CarInsurance("1", "State Farm");
echo $myCarInsurance->message();

echo "<br>";

$myCarInsurance = new CarInsurance("2", "Geico");
echo $myCarInsurance->message();


For Advanced Users

PHP External URL

Load PHP External URL in Browser URL like this https://xhcode.com/php-beautifier.html?url=external-url

PHP Data as Parameter

Load PHP Data in Browser URL input like this https://xhcode.com/php-beautifier.html?input=inputdata

https://xhcode.com/php-beautifier.html?input="Hello World!";echo "How areyou?";?>