How to use Babel Formatter
- Paste your code. The formatter engine loads in a moment the first time.
- Adjust the options if you need to.
- Copy the formatted result.
About Babel Formatter
Babel is the parser most of the JavaScript world uses, and it understands the newest syntax proposals, JSX included. This formatter parses your code with it and prints it again with consistent indentation, quotes and line breaks.
Unlike the JS Beautifier, it will refuse to format code with a syntax error and tell you where the error is. That makes it a good way to find a missing bracket as well.