Source Code Formatter is available as an online tool to format the code on the go as well as a plugin to be embedded into your website.
Using the Online Source Code Formatter Tool
To use the online tool, simply paste your source code into the text box, select a language and click on 'Format Source Code' button.
Formatting Option
1. Perform Only Escape Source
This option replaces all the escape characters present in the code to their html equivalent values. The Code becomes ready for putting into the HTML page.
An example run is shown below:
2. Perform Full Formatting with Syntax Highlight
This option performs all the formatting on the code. It replaces all the
escape characters in the code to their html equivalent values, performs syntax
highlighting and formatting needed for line numbering, removing blank
lines etc.
Note: It is to be noted this option embed html tags within your code to make it
presentable over the web.
An example run is shown below:
Online formatter also allow you to customise certain option like:
- Select a diferent theme. (Check available Themes here)
- Set tab size
- Display Line numbers.
- Remove Blank lines
- Limit the maximum height of code block and provide a scroll bar
- Maximum code block height if 'Limit Maximum Height' option is check.