JavaScript Beautifier

JavaScript Beautifier

Expand compact JavaScript for review.

Try this example

Load the sample and format it. The return statement is indented, and the space inside the string remains.

function greet(name){return name+"! "}

Expected result

function greet(name) {
    return name + "! "
}

This formatter is for readability. Run your normal tests before replacing production code.

Related walkthrough · When to Format or Minify HTML, CSS and JavaScript


Avatar

DTool Team

Product Team

We build simple, reliable browser tools that make everyday digital work faster.

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies