Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Online code beautifier and formatter [closed]

People also ask

How can I beautify my code?

Beautifying your code basically is to reformat your code to improve readability for a human by following some (user-defined) conventions i.e. re-indenting, splitting the code into lines, adding white spaces at required places to make it easier and faster to read.

What is a code beautifier?

A program that improves the presentation of programming source code. Based on an analysis of the syntax, it indents lines appropriately and squashes extraneous blank spaces and lines in order to produce more readable code.

How do I get a VSC code on beautify?

The code formatting is available in Visual Studio Code (VSCode) through the following shortcuts or key combinations: On Windows Shift + Alt + F. On macOS Shift + Option + F. On Linux Ctrl + Shift + I.

How do I get sublime beautify code?

Beautify on Save sublime-settings : Ctrl+Shift+P or Cmd+Shift+P in Linux/Windows/OS X.


CSS: code beautifier

HTML: HTML Tidy, CleanUp HTML or the general purpose Pretty Diff

Javascript: http://jsbeautifier.org/

PHP: http://beta.phpformatter.com/

SQL: http://dpriver.com/pp/sqlformat.htm

XML: http://chris.photobooks.com/xml/default.htm

Colour all: http://quickhighlighter.com/


For PHP, Java, C++, C, Perl, JavaScript, CSS you can try:

http://www.prettyprinter.de/index.php


You can use Perl::Tidy for Perl.


JsonLint is good for validating and formatting JSON.


What language?? There are different tools for almost every imaginable programming language, since they all have different syntactic rules and conventions.

Good ol' indent is a nice, customizable, command-line utility to format C and C++ programs.


It depends of the language, and of the architecture you are using.

alt textalt text

For example, in a php platform, you can format almost language with GeSHi

As bluish comments, GeSHi is a generic syntax highlighter, with no beautification feature. It is more used on the server side, and combine it with a beautification tool can be tricky, as illustrated with this GeSHi drupal ticket.