Skip to content

JavaScript Beautifier

Format and beautify JavaScript (including JSX and modern syntax) with Prettier: indentation, quotes and semicolons.

Runs in your browserJavaScript → JavaScript
Loading tool…

Example

Input
const add=(a,b)=>{return a+b}
console.log(add(1,2),'done')
Output
const add = (a, b) => {
  return a + b;
};
console.log(add(1, 2), "done");

How to use the JavaScript Beautifier

  1. Paste or type your JavaScript into the input area, or open a file from your device.
  2. Adjust the options above the editor if the tool offers any.
  3. Review the JavaScript result, then copy it or download it as a file.

Privacy and limitations

  • Your data is processed on your device and is not uploaded to any server.

Frequently asked questions

Can it un-minify code?

It restores indentation and line breaks, but minified variable names cannot be recovered because the original names are no longer in the code.

Is my code uploaded?

No. Prettier runs entirely in your browser.

Browse all beautifiers & formatters →