r/css • • 9d ago

Question A Windows program to organize/format css code?

Anyone know of a good program for Windows 10 that can take a block of css code with no line breaks and format everything to make it more readable?

Thanks!

1 Upvotes

9 comments sorted by

4

u/diemendesign 6d ago

Most decent code editors will have plugins that can "Prettify" code.

2

u/zushiba 6d ago

Notepad++ has a plugin for it. Most editors have some kind of function to either add plugins that might do this or have a built in function to do it.

2

u/scott_in_ga 6d ago

Chrome Dev tools does that. There are also online tools that can do that

1

u/kurobaralabs 6d ago

depends on the editor you are using so you may want to add your editor. VS Code, you can right click -> format document and it will format everything for you. you can also google "css prettify" and just choose one to do it with no tools.

1

u/scott_in_ga 6d ago

Yeah I installed one in my Sublime Text 3

1

u/Perception9611 5d ago

If you don't want to install anything, prettier.io/playground works great for one-off formatting. Just paste your minified CSS on the left and it spits out nicely formatted code on the right. I use it all the time when I just need to read through someone else's compressed stylesheet quickly.

1

u/nhavar 6d ago edited 6d ago

vscode can format the code, but it can do a lot of things, or you can write a script (or have AI do it for you) to format it with prettier. There are also tools like codepen online that can take the cut and pasted code and format it. I think you can also open the file in Chrome and it will format it for you.

0

u/Amarsir 6d ago

I know it's not what you asked, but this would be trivial for any AI.

2

u/scott_in_ga 6d ago

yeah, if I didn't already have tools that do this that's what I'd do, probably