Example input/output
Input: { "name": "devtools", "ok": true }
Output: {"name":"devtools","ok":true}
How it works
This tool removes all unnecessary whitespace characters (spaces, tabs, newlines) from JSON, JavaScript, CSS, or HTML code. The result is a compact single-line output that is functionally identical to the original.
FAQ
What types of code can be minified?
This tool strips whitespace from JSON, JavaScript, CSS, and HTML inputs. Paste any code block and click Minify Code.
Does minification change functionality?
No. Whitespace removal preserves the logic and values in your code.
Is my code sent to a server?
No. Minification runs in your browser.
Common use cases
- Switch between formatted and minified code representations
- Format code for debugging then minify for production deployment
- Compare formatted vs minified code size