Processing Mode
Choose how you want to process your code
Options
Input Code
Paste or drop your code here
API Access
Beta
Your API Key
No API Key
You don't have an API key yet. Generate one to access the API.
API Usage
Use your API key to access the code processor programmatically. Include it in the X-API-Key header with your requests.
Endpoint
POST
https://example.com/api/minifyMinify code to reduce its size with ES target support
ES Target Options (for JS/TS files):
"ES5" - Maximum compatibility"ES2015" - Modern baseline"ES2017" - Default (async/await)"ES2018" - Object spread"ES2019" - Array.flat"ES2020" - Optional chaining"ES2021" - Logical assignment"ES2022" - Class fieldsRequest
fetch("https://example.com/api/minify", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "your-api-key"
},
body: JSON.stringify({
"code": "function example() { const x = 1; return x; }",
"language": "javascript",
"options": {
"mangle": true,
"compress": true,
"removeComments": true,
"esTarget": "ES2017"
},
"generateSourceMap": true
})
})
.then(response => response.json())
.then(data => console.log(data))Response
{
"result": "function example(){return 1}",
"sourceMap": "{ ... source map data ... }"
}