1
0

Brotli Compress

Egor VolchenkoEgor Volchenko
CreatedNov 23, 2026
UpdatedNov 23, 2026

This 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.

1
1
Output Format:

How to use Brotli Compress

Use the following steps to process a small test input.

Compress text as Brotli

  1. Paste the data into Uncompressed Text and select UTF-8 under Input Encoding: for normal text, or select Hex or Base64 for encoded bytes.
  2. Choose Hex (lower), Hex (UPPER), or Base64 for the compressed bytes. The Compressed Result (Base64) label stays the same when you select Hex.
  3. Leave Auto / Live on to update the result as you edit. To run manually, turn it off and click Run.
  4. Read Compressed Result (Base64) in the selected representation. Keep that representation with the payload when passing it to a decoder.
  5. 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.

No API Key Required 60 req/min
https://million.tools/api/v1/run/brotli-compress

Request Parameters (JSON / Form Data)

  • start (or input)

    Uncompressed Text

    Type: string Default: —
  • input_encoding

    Input Encoding

    hex hex_ignore_non_hex base64 utf-8 utf-16le utf-16be windows-1251 windows-1252
    Type: string Default: utf-8
  • output_format

    Output encoding format

    hex hex_upper base64
    Type: string Default: hex
bash — cURL
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=="
    }
}
Egor Volchenko
Egor Volchenko Developer & Author

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.

Published:
Updated:

Ratings & feedback 0

Share your experience with this tool.

Leave feedback

Your rating (optional)

Select a rating

Write a review, leave a rating, or do both.

Your email stays private.

No feedback yet

Be the first to leave a review or rating.