Coding With Sonu
HTML
CSS
Javascript
Jquery
PHP
JAVA
Python
Android
Cross-Platform Apps
Database
Bootstrap
Testing
DSA
Electronics
Tools
Products
JavaScript Beautifier
This is a lightweight beautifier - it indents code blocks, if/else/try/catch, and statements well, but object literals are left exactly as typed rather than risk reformatting them incorrectly.
Indent Size
2 Spaces
4 Spaces
Tab
Beautify JavaScript
Input JavaScript
function greet(name){var msg=`Hello, ${name}!`;console.log(msg);if(name==='Sonu'){console.log('special case');}return msg;}
Beautified JavaScript
Save
Copy