WebBeautify

Minify · Beautify · Pretty-print · Encode

Paste messy code. Get a clean result.

Online minifier, beautifier, JSON formatter, SVG compressor, SQL pretty-print, Base64 encode — paste on the left, Run, copy. No signup. Runs in your tab unless you tick the server box.

88 tools. Shortcut: Ctrl or Cmd + Enter.

MinifyCompress / uglifyGo live, embed,email, inline SVGBeautifyUnminify / indentVendor one-liner,CMS dump, gistFormatPretty-printAPI JSON, SQL log,YAML, HTML email
Minify for size. Beautify to unminify. Format / pretty-print to keep indent consistent.

Recently used tools

Pick the job

Minify, beautify, format, validate, convert, encode — each hub is a set of real editors.

All tools →

Tools people actually paste into

How folks use them: paste the file, hit Run, copy the output. Why: a five-minute job that does not deserve a local toolchain.

Minify vs beautify vs pretty-print

Minify (compress, uglify whitespace) when the file is going live or getting embedded. Beautify (unminify, indent) when a vendor dump or minified library is unreadable. Pretty-print / format when you want the same indent every time — JSON formatter for an API response, SQL formatter for a log, YAML for CI.

They are not interchangeable with gzip, Brotli, Terser mangling, Prettier in git, or a JSON schema checker. An online minifier is conservative on purpose so a pasted snippet does not lose a string. A bundler still wins for an app you own.

How a pass works here: paste or drop a file, set comment/indent options if you see them, Run (or Ctrl / Cmd + Enter), copy. Default processing stays in the browser. Tick “Process on server” only for that one request.

Typical stylesheet on the wire24 KB pretty18 KB minified~6 KB gzip
Pretty CSS 24 KB → minified 18 KB → gzip about 6 KB. The steps stack.

Runs in the tab

By default nothing is uploaded. HTML, tokens, and half-finished JSON stay on this device unless you opt into the server checkbox.

Language-specific tools

HTML minify, CSS minify, and minify JS follow different whitespace rules. JSON pretty print is not SQL format. Pick the editor that matches the file.

Drafts stay local

Theme, last tools, and editor drafts live in this browser. Clear site data and they are gone.

Minify, beautify, and pretty-print — common questions

When should I minify code, and when should I beautify it?

Beautify (or format) while you are reading and editing. Minify when the file is going live or getting embedded. function hi(){return 1} is for the wire. The indented version is for your brain. Using minified HTML as your only source of truth is a gift to nobody.

Does minifying HTML, CSS, and JavaScript follow the same rules?

No. HTML cares about spaces between inline tags. CSS mostly does not care about spaces around {. JavaScript will fight you if you smash strings or return plus a newline. That is why they are separate tools, not one “crush everything” blender.

What is a tiny JSON pretty-print example?

{"ok":true,"n":1} becomes a two-space tree with "ok" and "n" on their own lines. If that fails, you probably have a trailing comma or single quotes — which is JavaScript, not JSON. Fun fact: JSON will not accept NaN even though JS will.

If gzip already shrinks files, why minify?

Gzip repeats patterns; minify deletes comments and pretty spaces those patterns were repeating. They stack. A stylesheet might go 24 KB → 18 KB minified → ~6 KB gzipped. Quoting only one of those numbers starts office folklore.

Can I keep comments in JSON?

Not in real JSON. {"flag": true // beta} will fail a strict parser. JSONC (VS Code settings) allows comments; APIs usually do not. Strip comments, then send real JSON. Your future parser will thank you.

Why bother formatting SQL?

The database does not care. Humans catch a missing WHERE when FROM users sits on its own line. SELECT * FROM users JOIN orders is how you leak a password hash and scan a table. Format is a review tool, not an index.

Is Base64 a way to hide an API key?

No. WebBeautifyV2ViQmVhdXRpZnk= is a costume. Anyone decodes it. Base64 is for stuffing bytes into JSON or a data URL. Hashing is one-way. Encryption needs a key you do not paste into a frontend bundle.

What is the difference between minifying SVG and compressing a PNG?

SVG minify deletes extra markup — comments, editor layers — not pixels. A PNG compressor throws away image data on purpose. If your “icon” is a photograph saved as a million path points, it may not want to be SVG at all.