டெவலப்பர் கருவிகள்
கோட் மினிஃபையர்
HTML, CSS, JavaScript ஐ மினிஃபை செய்யவும்: குறிப்புகள், இடைவெளிகள், வரி முறிவுகளை நீக்கி கோப்புகளைச் சிறியதாகவும் பக்கங்களை வேகமாகவும் ஆக்கவும், gzip க்கு முன்னும் பின்னும் சேமிப்பைப் பார்க்கவும்.
Why minify?
Browsers do not need comments, indentation or line breaks, but every byte still has to be downloaded. Minifying typically makes CSS and JavaScript 20 to 50% smaller, so pages load faster, especially on slow mobile data, and Google PageSpeed Insights stops warning you to "minify CSS" and "minify JavaScript". Faster pages also rank better in search and keep more visitors.
What you can do with the Code Minifier
- HTML, CSS, JS: Including inline styles and scripts.
- Safe: Strings, regex and licences are kept.
- Size saved: Before, after and after gzip.
How to use it
Pick HTML, CSS or JavaScript, paste your code (or tap Sample), and the minified version appears below with the size before and after. Tap Copy or Download to save it as a .min file. Keep your original file for editing: minified code is hard to read. For HTML pages, leave "Also minify CSS and JavaScript inside the page" on to shrink inline <style> and <script> blocks too.
Minify, gzip and build tools
Most web servers and CDNs (including Cloudflare, Netlify and Vercel) already compress files with gzip or Brotli when sending them. Minifying and gzip work together: minified files compress even smaller. The After gzip number shows roughly what visitors will download. In big projects, build tools like esbuild, Vite or Terser also shorten variable names; use this tool for quick jobs, small sites, WordPress custom code and checking a snippet.
What it does not change
It never renames variables or functions, never rewrites your logic, and leaves strings, template literals, regular expressions and the text inside <pre> exactly as written. Comments that start with /*! are kept because they usually hold a licence that must stay with the code. Conditional comments for old Internet Explorer are kept in HTML.
A worked example
CSS before: /* Main button */ .btn { color : #ffffff ; padding: 10px 16px; } (about 70 bytes with line breaks). After: .btn{color:#ffffff;padding:10px 16px} (37 bytes), about 45% smaller. The comment, spaces around : and ;, and the last ; before } are gone.
Before you put minified code live
Keep the original files in your project, ideally in Git, and minify a copy. Test the page in a browser after minifying. If something breaks, compare the two and look for a missing semicolon at a line end in the original JavaScript, which is the most common cause.
Related tools
நிஜ வாழ்க்கை உதாரணங்கள்
Make a style file smaller
Paste your CSS and the comments, spaces and last semicolons go. A short rule set like body { color: red; } becomes body{color:red}. The tool shows the size before and after, and the gzip size too.
Check before you upload
Minify the JavaScript for a small landing page and test the page again before you upload. The tool keeps the line breaks that the code needs, but your own test is the final check.
HTML for an email template
Paste the HTML and minify it. Extra spaces between tags are removed, but text inside pre and textarea is kept exactly, so code samples and addresses stay as they were.
Frequently Asked Questions
Will minifying break my JavaScript?
It should not. The minifier understands strings, regular expressions, template literals and comments, keeps a line break wherever JavaScript might need it to end a statement, and never renames anything. Still, test the minified file before you put it live, and keep the original for editing.
How do I un-minify (beautify) code?
Minified code loses comments and layout, which cannot be brought back, but its structure can be re-indented. Open the file in your browser's developer tools (Sources tab, then the { } button), or use a formatter like Prettier in your code editor.
Does it support JSON?
For JSON use our JSON Formatter and Validator: pick Minify as the output style to put it on one line, or 2 or 4 spaces to make it readable again. JSON-LD data blocks inside an HTML page are minified here too.
How much smaller will my file get?
Hand-written CSS and JavaScript with comments and indentation usually shrink by 20 to 50%. Code that is already compact saves less. The After gzip figure is closer to what visitors actually download, because servers compress files before sending them.
Is what I paste sent anywhere?
No. Your code is minified on your device. Everything runs in your browser on your own phone or computer, and nothing is sent to our servers or saved.
Is the Code Minifier free?
Yes. There is no sign-up, no limit and nothing to install. It also works offline once the page has loaded.
Is minifying the same as compressing?
No. Minifying removes characters the browser does not need, and the file is still normal code. Compressing (gzip or Brotli) packs the file for sending and the browser unpacks it. Use both: they add up.
Should I minify the HTML of my website?
It helps a little, usually 5 to 15%, because most of the page is text and tags that must stay. Minifying CSS and JavaScript saves more. For WordPress, a caching plugin can do all three automatically.
Why is a line break left in my minified JavaScript?
JavaScript uses line breaks to end statements when there is no semicolon. Where removing a break could change the meaning (for example a line starting with ( or [), the minifier keeps it to stay safe. Add semicolons to your code to remove them.
Does it remove console.log?
No. It never changes what the code does, so console.log and debugger lines stay. Remove them in your code before minifying, or use a build tool option like esbuild's drop: ["console"].
More developer tools
- UUID ஜெனரேட்டர்: Generate random version-4 UUIDs (GUIDs) for databases, APIs and software development.
- நிற வடிவ மாற்றி: Convert colours between HEX, RGB and HSL formats in either direction, with a live colour preview.
- எண் அடிமான மாற்றி: Convert numbers between binary, octal, decimal and hexadecimal, or to any base up to 36, with a bit view.
- Unix நேரமுத்திரை மாற்றி: Convert a Unix timestamp to a readable date and time, or a date back to Unix time, in your time zone or UTC.
- CSS அலகு மாற்றி: Convert px to rem, em, pt and percent with your own base font size.
- ஹாஷ் ஜெனரேட்டர்: Make MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text or file, or HMACs with a secret key, and check a hash against a file.