JavaScript Formatter
Beautify and tidy JavaScript code.
This free JavaScript formatter runs your code through the Prettier engine for clean, standards-compliant output — consistent indentation, line breaks, quote style and spacing that goes beyond a simple re-indenter. Choose 2-space, 4-space or tab indentation, set a wrap width, switch between single and double quotes, and toggle semicolons. A Minify option strips comments and extra whitespace to shrink file size while preserving strings, template literals and regular expressions. If Prettier can't parse a partial or invalid snippet, the formatter falls back to a brace-depth re-indenter so you still get readable output.
Related tools
JSON Formatter
Format, beautify & validate JSON data.
Base64 Encoder / Decoder
Encode and decode Base64 text instantly.
URL Encoder / Decoder
Percent-encode and decode URLs safely.
Regex Tester
Test regular expressions with live match highlighting.
JWT Decoder
Decode JWT header and payload claims.
Timestamp Converter
Convert Unix timestamps to dates and back.