FAQ
Does my JavaScript leave the browser? Formatting and validation run locally. A URL in the input box is the exception: the browser requests that address directly, and the remote host can refuse the request.
Why did a URL fail? Most sites omit the CORS headers a browser page needs. Save the file and drop it in, or paste the script instead.
What does Fix JavaScript change? If the script cannot be parsed, it is rebuilt from a best-effort parse so the rest can still be formatted. A hole that cannot be recovered is written as /* missing */. Broken JSX is reported and left unformatted. An invalid token in code that already parses is not rewritten.
Will it rewrite my code? It adds indentation, spaces around operators, and semicolons. Strings, comments, and the spelling of numbers stay as written. Parentheses that group a value stay too. A new call is printed with parentheses. It does not rename variables, sort keys, or convert var into let.
Why was a line flagged? Warnings are for ==, var, debugger, eval, with, an assignment in a condition, a duplicate object key, unreachable code, an empty block, an empty catch, and a legacy octal. Switch Validation to Errors Only to hide them. An extra pair of parentheses around an assignment, if ((a = b)), keeps that warning quiet.
Does it accept TypeScript or JSX? JSX is formatted. Type annotations, enum, and interface are syntax errors here.
