7

Sometimes I have a piece of code, which could be SQL or JSON or JavaScript or anything else, and I want to beautify it, i.e. make it nicely indented and colorized so it'll be easy to read.

If you search online you can find a beautifier for any language, for example this for SQL: http://www.dpriver.com/pp/sqlformat.htm

The problem is, I don't want to be sharing my code online. If there was a single desktop program (for Windows 7) that I can use which will beautify code, and code of any kind of language (at least the popular ones), that would be ideal.

  • 1
    For which operating system? Do you want to export the beautified code (if so, in which format) or is it only about displaying? – unor Feb 19 '15 at 3:09
  • 2
    If you google for it and skip the first five to ten results, you will also find offline formatters for any language, like this one: architectshack.com/PoorMansTSqlFormatter.ashx, this one uncrustify.sourceforge.net, or this one astyle.sourceforge.net – Doc Brown Feb 19 '15 at 7:18
  • Operating system: Windows 7. No need to export the code. – Ram Rachum Feb 19 '15 at 12:53
  • Thanks @DocBrown but I prefer desktop software. – Ram Rachum Feb 19 '15 at 12:54
  • 1
    For python I use JetBrain's PyCharm which restructures your code to the python style guide. JetBrains has several editors, they might do what you are looking for in Java, SQL etc. – jojo Feb 19 '15 at 15:35
4

Atom.io is another text tool with beautification functionality tools available. The package I linked will format about a dozen languages out of the box. Others can be added through separate configuration files (if atom-beautify doesn't know how to beautify the language you're working in, it will tell you were you can find download the needed configuration files). There are linters and debugging tools available for Atom well.

2

Notepad++ has color highlight for many languages built in and reformatting plugins for some languages, e.g. Javascript

https://notepad-plus-plus.org/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.