Is there an online C# beautifier that is easy to paste-beautify-copy from?

I am looking for one that has options for:

  • Indentation (4 spaces, n spaces, tab char, etc)
  • Curly braces placement (on the statement line, on own line)

Much like Jsbeautier, but for C#.

  • Any particular reason you want it to be online rather than a program on your computer? Mar 23, 2014 at 22:44
  • @NickWilde because the code I mostly beautify is copypasted from SO posts which have pieces of code that do not compile or are errenous by themselves, so that is out of the question. Mar 23, 2014 at 23:01
  • I would expect that there are some plugins that could do that without compiling but I see what you mean Mar 23, 2014 at 23:13
  • 1
    Oh, wait, you mean why not offline if there could be such a program. No reason why not, really, but online could be much more accessible and not require additional installation, which is nice if my notebook isn't with me. Mar 23, 2014 at 23:15

4 Answers 4


C# Formatter Online


  • Correct beautify.
  • Online.
  • Input C# code and copy/paste c# beautified code.
  • Download .cs beautified version.


  • Only two options for formatting fonts: small and big.
  • K&R bracing, which is not usual C# formatting.
  • 1
    K&R bracing was exactly what I've been looking for. Huge surprise for me that it exists. Jan 15, 2020 at 2:03

C# Viewer

It does not really have any of the extra options that you want. However it does very nicely beautify - and also minify - C# code.

It also lets you one click download the code as a *.cs file and load C# code to process from a file or web location as well as Copy/Paste.

  • This is nice and it has some auto-formatted editing capabilities, but editing the beautified code messes up the space characters and it doesn't have options for curly braces or any other options at that. Mar 23, 2014 at 23:20
  • Yeah that's what I saw but I'm not aware of any other options (I used it fair while ago for some SO code myself but since I rarely use C# I haven't had much inclination to search for something better. Mar 23, 2014 at 23:23

Although it has to be installed a better solution is to use SublimeAStyleFormatter - which is a Sublime Text Plugin.

You have to first install Sublime Text (painless) and then install SublimeAStyleFormatter which is also quite painless. There are a couple methods you can use to install it (all of which are detailed in the readme) but I recommend the Package Control method as very easy.

There are quite a few options:


I would use the online c# formatter http://codebeautify.org/csharpviewer where I can formate as well as share my code as public or private.

  • 1
    That answer was already given
    – user416
    May 7, 2015 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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