JavaScript & CSS Formatter
Pick a language, paste your code and press “Format code”.
Your text and files never leave your browser — nothing is sent to a server.
How to use
- Choose JavaScript, TypeScript, CSS, SCSS, LESS or JSON under “Language”.
- Paste your code and press “Format code” to fix indentation and line breaks. Minified one-line code is expanded into readable form.
- Use “Semicolons” and “Single quotes” to match your team’s style. The semicolon option only applies to JavaScript and TypeScript.
- If the syntax is wrong, the problem line is shown with a ^ marker and the status line gives the line and column.
FAQ
Which formatting rules are used?
It runs Prettier, the open-source formatter (MIT license), in your browser, so the output closely matches Prettier in your editor. The first time you pick a language, its formatter module may take a moment to download.
Can it minify code instead?
This tool expands code for readability. To shrink files, use the JS & CSS Minifier.
Is my code sent to a server?
No. Everything is processed in your browser and nothing is uploaded.
Related tools
All tools
Unit Converters
- Unit Converter
- Temperature Converter
- Weight Converter
- Area Converter
- Length Converter
- Angle Converter
- Calorie Converter
- Data Size Converter
- Dry Volume Converter
- Electric Charge Converter
- Energy Converter
- Flow Rate Converter
- Force Converter
- Fuel Economy Converter
- Luminous Intensity Converter
- Magnetomotive Force Converter
- Power Converter
- Pressure Converter
- Radiation Dose Converter
- Speed Converter
- Time Unit Converter
- Volume Converter