JS Formatter

JavaScript

Beautify or minify JavaScript; convert ESM↔CJS modules; check JS syntax; obfuscate JavaScript code.

Preserve newlines

JavaScript

Beautify or minify JavaScript; convert ESM↔CJS modules; check JS syntax; obfuscate JavaScript code.

Common uses

  • Beautify minified third-party code
  • Convert require() calls to ES module imports
  • Obfuscate JavaScript for client-side protection

Also searched as

  • javascript beautifier online
  • unminify javascript
  • javascript minifier online
  • javascript syntax checker online
  • convert require to import es modules
  • convert commonjs to esm
  • javascript obfuscator online
  • deobfuscate javascript
  • lua formatter online
  • javascript lint online

Frequently asked questions

How do I make minified JavaScript readable?

Paste it into the Format tab and choose beautify. It restores indentation and line breaks. Original variable names are not recovered if they were mangled.

How do I convert require() to import statements?

Use the ESM ↔ CJS tab to convert between CommonJS and ES module syntax in either direction.

Can I check JavaScript for syntax errors without running it?

Yes. The Syntax Checker tab parses your code and reports errors, and a JS Quality Lint tab flags style and quality issues. Your code is not executed.

Can I obfuscate or deobfuscate JavaScript?

There are separate Obfuscator and Deobfuscator tabs. Obfuscation makes code harder to read but is not real security.

Is there a Lua formatter here?

Yes, the Lua Formatter tab beautifies Lua 5.1 to 5.4 scripts using lua-fmt.

Is my data uploaded to a server?

No. This tool runs entirely in your browser — your input is processed locally on your device and is never uploaded or stored on a server.