Online PHP Code Beautifier

This tool is designed to beautify PHP code, applying most of the PEAR standard requirements to it. It can even process really scrambled scripts, e.g. all code in one line, and thus may help you to get scripts into a more readable form.

This tool does not record any submissions - we don't email, store, save, or in any other way look at your code. However we don't run SSL therefore your code could be viewed as network traffic if someone between you and our web server is running packet sniffing software.

You can jump right in, but I recommend reading the description below before using this.

Upload a php script from your local system:

Or:

Paste PHP Code here 1MB maximum.

What this tool does:

In General:

  • Adds missing line breaks without removing any additional line breaks that you may use to group related things.
  • Corrects wrong indentation according to the level of nested braces.

Specific Pear standard requirements:

  • Tries to set missing curly braces around single conditional statements. This may not work in all situations.
  • Indents with four spaces.
  • Uses "one true brace" style in function definitions.
  • Sets one space between control keyword and condition.
  • Removes space between function calls, parenthesis and beginning of argument list.

What this tool doesn't do:

In General:

  • It does not record any submissions - we don't email, store, save, or in any other way look at your code. However we don't run SSL therefore your code could be viewed as network traffic if someone between you and our web server is running packet sniffing software.
  • It does not sanity-check or correct your code. This is no debugging tool, it only arranges things properly.
  • It does not support the "if: ... endif;" syntax for control structures when indenting.
  • This tool is dedicated to beautify php code it does not work with embedded html.

Pear standard requirements:

  • It does not add spaces on either side of the assignment operator.
  • It currently does not convert different php tags into the recommended form.
  • It does not do anything about naming conventions or commenting style or the way you include other scripts, this is entirely up to you.

Original code from: www.tote-taste.de/X-Project/beautify/index.html


Dig It

For web site hosting I recommend - www.bluehost.com