About this Beautify
B4 Beautify is a free online beautifier that turns messy, minified or single-line code and text into clean, readable, properly indented output. You don't need to pick a tool for each format: paste your content and the language is detected for you.
It works as a JSON beautifier, XML formatter, HTML beautifier, CSS beautifier, JavaScript beautifier, SQL formatter, YAML and Markdown formatter, and text beautifier in one place. Everything runs locally in your browser, so private API responses, config files and logs never leave your computer.
Features
- Auto-detects 13 formats
- Beautify, minify and validate
- 2 spaces, 4 spaces or tab indentation
- Clear error messages for invalid JSON and XML
- Open or drag-and-drop files
- Dark mode, works on mobile
- No sign-up, no upload, no limits
How to use
- Paste your code or text into the Input box, or drop a file onto it.
- Leave Language on Auto-detect, or pick a format.
- Press Beautify (Ctrl+Enter). Use Minify for a compact version, or Validate to check syntax only.
- Click Copy to copy the result.
Frequently asked questions
What does “beautify” mean?
Beautifying (also called pretty-printing or formatting) re-indents code and text and adds consistent line breaks and spacing so it's easy to read. It doesn't change what the code does.
Is this online beautifier free?
Yes. B4 Beautify is completely free with no account, no ads walls and no usage limits.
Is my data safe?
Yes. All formatting runs in your own browser with JavaScript. Your input is never sent to a server.
Which formats are supported?
JSON, JavaScript, TypeScript, HTML, XML, CSS, SCSS, LESS, SQL, YAML, Markdown, GraphQL and plain text.
More free formatters
- JSON Beautifier & FormatterFormat & validate JSON
- XML Beautifier & FormatterPretty print XML
- HTML Beautifier & FormatterClean up HTML markup
- CSS Beautifier & FormatterFormat CSS, SCSS & LESS
- JavaScript Beautifier & FormatterBeautify JS code
- TypeScript Formatter & BeautifierFormat TS code
- SQL Formatter & BeautifierFormat SQL queries
- YAML Formatter & ValidatorFix YAML indentation
- Markdown FormatterTidy Markdown docs
- GraphQL FormatterFormat GraphQL queries
- Text BeautifierClean up plain text