Enter code to see formatted output
Indentation
2 spaces
Line Width
80 characters
Quotes
Single quotes
Semicolons
Always add
Trailing Commas
ES5 compatible
Bracket Spacing
Enabled
Arrow Functions
Always parentheses
HTML Whitespace
CSS display rules
Yes, completely free with no sign-up required. Format unlimited code for your projects.
No, all formatting happens in your browser using Prettier. Your code never leaves your device.
Select your language (JavaScript, HTML, CSS, or JSON), adjust indentation size and choose between spaces or tabs, paste your unformatted code into the input area, and watch it automatically format with consistent spacing and style. Click copy to get the beautifully formatted code.
We use industry-standard Prettier rules: single quotes, semicolons, 80-character line width, ES5 trailing commas, bracket spacing, and always-parentheses for arrow functions.
Yes! You can adjust indentation size (2, 4, or 8 spaces) and choose between spaces or tabs. Other settings follow Prettier best practices for consistency.