Summary
JavaScript Formatter accepts clearly invalid JavaScript and presents it as output instead of showing a syntax error. The page's own guidance says syntax errors should prevent formatting.
Affected route: https://byteflow.tools/en/javascript-formatter
Reproduction
-
Enter this input:
-
Click Format.
Expected:
- show a syntax/parse error;
- clear or invalidate the output;
- do not enable Copy/Download for invalid formatted code.
Actual:
- no error is shown;
- the output is the same invalid text:
const = ;;
Copy Output remains enabled.
A second malformed sample, function (, was also accepted and returned as function( without an error.
Control case
A valid input such as function add(a,b){return a+b;}const value=add(1,2); formatted correctly and copied correctly. The issue is the missing rejection/error path for malformed syntax.
Environment
- Browser: Chrome via cloud browser
- Tested: 2026-08-18
Summary
JavaScript Formatter accepts clearly invalid JavaScript and presents it as output instead of showing a syntax error. The page's own guidance says syntax errors should prevent formatting.
Affected route: https://byteflow.tools/en/javascript-formatter
Reproduction
Enter this input:
Click
Format.Expected:
Actual:
const = ;;Copy Outputremains enabled.A second malformed sample,
function (, was also accepted and returned asfunction(without an error.Control case
A valid input such as
function add(a,b){return a+b;}const value=add(1,2);formatted correctly and copied correctly. The issue is the missing rejection/error path for malformed syntax.Environment