Brotli Compress
Developer & Author —Egor VolchenkoThis Brotli compressor converts pasted text or encoded bytes into a compressed stream displayed as Hex or Base64. Use it to prepare a small test payload or reproduce a compression step in an integration. The form processes text input rather than uploading files.
How to use Brotli Compress
Use the following steps to process a small test input.
Compress text as Brotli
- Paste the data into Uncompressed Text and select UTF-8 under Input Encoding: for normal text, or select Hex or Base64 for encoded bytes.
- Choose Hex (lower), Hex (UPPER), or Base64 for the compressed bytes. The Compressed Result (Base64) label stays the same when you select Hex.
- Leave Auto / Live on to update the result as you edit. To run manually, turn it off and click Run.
- Read Compressed Result (Base64) in the selected representation. Keep that representation with the payload when passing it to a decoder.
- Click Copy to copy the result. Use Clear where shown, or the field clear controls, to remove the text.
For UTF-8 input hello, one verified lowercase Hex result is 0b028068656c6c6f03. The same compressed bytes in Base64 are CwKAaGVsbG8D. Valid encoders can produce different byte streams that restore the same text.
A rejected request may leave an earlier result visible. Clear the fields and recheck the input before relying on a new calculation.
Recognize the compressed format
Brotli is useful for compressing text such as HTML, CSS, or JSON. This text form produces a Brotli byte stream; it does not change your web server’s compression settings.
Choose a useful comparison
Compression removes redundancy from bytes; Hex and Base64 then make those bytes printable. Their character counts are not the compressed byte count. Small or already compressed input can grow rather than shrink.
Frequently asked questions
No. The form compresses the supplied bytes as a single stream. It has no file picker, folder input, or archive-entry interface.
API — Brotli Compression Tool
Automate this tool directly from your scripts, CI/CD pipelines, or backend applications via HTTP POST.
https://million.tools/api/v1/run/brotli-compress Request Parameters (JSON / Form Data)
-
start(orinput)Uncompressed Text
-
input_encodingInput Encoding
hexhex_ignore_non_hexbase64utf-8utf-16leutf-16bewindows-1251windows-1252 -
output_formatOutput encoding format
hexhex_upperbase64
curl -X POST https://million.tools/api/v1/run/brotli-compress \
-H "Content-Type: application/json" \
-d '{"start":"Hello, million.tools!","output_format":"base64"}' const response = await fetch('https://million.tools/api/v1/run/brotli-compress', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"start": "Hello, million.tools!",
"output_format": "base64"
}),
});
const data = await response.json();
console.log(data.result); import requests
response = requests.post(
'https://million.tools/api/v1/run/brotli-compress',
json={
"start": "Hello, million.tools!",
"output_format": "base64",
},
timeout=15,
)
data = response.json()
print(data['result']) $ch = curl_init('https://million.tools/api/v1/run/brotli-compress');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'start' => 'Hello, million.tools!',
'output_format' => 'base64',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $response['result'] ?? ''; {
"status": "success",
"tool": "brotli-compress",
"service": "brotli_compress",
"result": "CwqASGVsbG8sIG1pbGxpb24udG9vbHMhAw==",
"results": {
"result": "CwqASGVsbG8sIG1pbGxpb24udG9vbHMhAw=="
}
}
Hi! I’m a WordPress developer with over 10 years of experience. I love Tailwind CSS, clean code, and intuitive interfaces. I’m currently working on million.tools — a service with convenient online tools for everyday tasks. I’m building it from scratch with great attention to detail and user experience.
Ratings & feedback 0
Share your experience with this tool.
No feedback yet
Be the first to leave a review or rating.