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.
Recently used tools
Pick the job
Minify, beautify, format, validate, convert, encode — each hub is a set of real editors.
Minify
HTML compressor, CSS minify, minify JS, JSON minify, SVG compressor. Strip comments and extra space before the file goes live. Gzip still sits on top.
Beautify
Beautify / pretty-print / unminify: indent HTML, CSS, JavaScript, JSON, XML, SQL. Names stay. Only whitespace comes back.
Formatters
JSON formatter and JSON pretty print, SQL formatter, XML, YAML, HTML, GraphQL. Consistent indent so an API body or a log query is readable.
Validators
JSON lint / JSON validate, XML well-formed, HTML nest check, CSS braces, JWT decode. Pass or fail with a reason.
Converters
JSON to XML, CSV to JSON, YAML to JSON, HTML to Markdown, JSON to PHP array, JSON to TypeScript. Facts stay. Wrapper changes.
Encode & Hash
Base64 encode / decode, URL encode, HTML entities, MD5, SHA-256. Encoding is a costume. Hashing is one-way. Neither is a lock.
Optimize
Gzip size estimate, strip comments, SVG optimizer. Minified bytes and gzip bytes are different numbers — quote both.
Utilities
Text diff, JSON diff, slug generator, UUID v4, case converter, word count, JS obfuscator. Small jobs. Obfuscate is delay, not DRM.
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.
Strip comments and extra space from markup before a page goes live. HTML compressor that keeps <pre> and most script guts alone.
CSS Minifier minifyCompress a stylesheet: drop /* comments */ and padding around braces. Pair with gzip — minify is not a CDN.
JavaScript Minifier minifyMinify JS / uglify whitespace without renaming your variables. Snippets, bookmarklets, gists — not a Terser replacement.
JSON Formatter formatJSON pretty print a one-line API body. Fails on trailing commas. Same instinct as JSON beautifier; minify JSON is the inverse.
HTML Beautifier beautifyUnminify HTML. Indent tags from a CMS dump or a minified email so you can see the tree again.
SVG Minifier minifySVG compressor for icons: delete Illustrator comments and metadata, keep path data. Not PNG quantization.
SQL Formatter formatPretty-print a query from a log. SELECT / FROM / WHERE on their own lines. The database does not care; reviewers do.
Base64 Encode encodeBase64 encode text or bytes for JSON and data URLs. Decode on the twin page. Not encryption. SHA-256 if you meant a hash.
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.
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. WebBeautify ↔ V2ViQmVhdXRpZnk= 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.