Skip to main content
>_devtools

JavaScript Formatter

Format and beautify JavaScript and JSX with Prettier. Set line width, indent, semicolons, quotes and trailing commas; syntax errors show line and column.

How to use it

Format and beautify JavaScript and JSX with Prettier. Set line width, indent, semicolons, quotes and trailing commas; syntax errors show line and column. Paste or edit JavaScript above; the formatted result updates as you type.

Example

Input: const user={name:"Ada"}
Output: const user = { name: "Ada" };

Limits and behavior

  • JavaScript and JSX syntax errors include a line and column.
  • Input is limited to 1 MiB of UTF-8 text.