InputTestHub

Deflate and Base64 Tool

Compresses text to gzip, zlib or raw deflate and returns base64, or expands a pasted base64 stream back to text, entirely in the browser.

Developer Nothing uploaded No sign-up Free, unlimited
Developer tool
Paste something on the left to see the result.
In short Deflate and Base64 Tool is a free online tool on inputtesthub.com that compresses text to gzip, zlib or raw deflate and returns base64, or expands a pasted base64 stream back to text, entirely in the browser. It needs no account, no download and no payment, and there is no daily usage limit. Everything is processed inside your own browser, so the data you paste is never uploaded to a server.

How to use the Deflate and Base64 Tool

  1. Paste the text or the base64.
  2. Choose the direction.
  3. Pick the format — raw deflate is the common one inside other protocols.
  4. Read the header bytes to confirm you chose right.

About the Deflate and Base64 Tool

The Deflate and Base64 Tool compresses text to gzip, zlib or raw deflate and returns base64, or expands a pasted base64 stream back to text, entirely in the browser. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Debugging a wire format that carries deflate inside base64.
  • Expanding a compressed payload out of a URL or a JSON field.
  • Seeing the header bytes that distinguish gzip from zlib from raw.

Details

EngineCompressionStream and DecompressionStream — no library
gzip header1f 8b
zlib header78 followed by a flag byte
raw deflateNo header at all — undetectable by inspection
Base64 overheadAbout 33% on top of the compressed bytes
The failure mode here is honest, which is unusual for compression tools. Gzip and zlib both carry a checksum, so a wrong format or corrupt data fails outright rather than producing plausible-looking nonsense. Raw deflate has no checksum, so it is the one case where a bad guess can return garbage that looks like data.

Where this tool stops

Text in, text out. Binary payloads can be compressed but the expanded result is shown as text, which will look wrong for anything that is not.

Frequently asked questions

Which format is inside my payload?
Look at the first bytes, which this shows when compressing. <code>1f 8b</code> is gzip, <code>78</code> is zlib, and anything else is probably raw deflate. If you are expanding and it fails, that ordering is the fastest thing to try.
Why is the base64 longer than the original text?
Two effects stack. Base64 encodes three bytes as four characters, adding about a third; and short inputs barely compress, because the header and the initial dictionary cost more than the redundancy in a sentence. Below a few hundred bytes, compressing then base64-encoding almost always grows the data.
Is this the same as URL-safe base64?
No. This is standard base64 with <code>+</code> and <code>/</code>. If your payload came from a URL it may use <code>-</code> and <code>_</code> instead — swap them back before pasting, or it will not decode.
Are there any usage caps on the Deflate and Base64 Tool?
There is no cost and no cap. The Deflate and Base64 Tool is not a demo of a paid product, so nothing is held back or watermarked.
Does anything I enter leave my computer?
No. The Deflate and Base64 Tool runs entirely in your browser using JavaScript. Because the work happens locally, the page also keeps working if your connection drops, and closing the tab is all it takes to discard everything.
Who is the Deflate and Base64 Tool for?
Typical uses: debugging a wire format that carries deflate inside base64. Expanding a compressed payload out of a URL or a JSON field. Seeing the header bytes that distinguish gzip from zlib from raw. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
When is the Deflate and Base64 Tool not the right tool?
Text in, text out. Binary payloads can be compressed but the expanded result is shown as text, which will look wrong for anything that is not. Knowing where a tool stops being trustworthy matters more than the cases where it works.
Which values should I know?
Engine is CompressionStream and DecompressionStream — no library. gzip header is <code>1f 8b</code>. zlib header is <code>78</code> followed by a flag byte. These are printed on the page itself, so you do not have to take them on trust.
Does the Deflate and Base64 Tool work on a phone?
Yes. The page is responsive and the page works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related developer tools

All 92
01

JSON Formatter

Formats, indents and validates JSON with precise error positions, key sorting and a…

02

JSON Validator

Checks whether JSON is valid and reports the exact line, column and reason for the first error…

03

JSON Minifier

Strips all whitespace from JSON to produce the smallest valid output, showing the bytes saved.

04

JSON to CSV Converter

Converts a JSON array of objects into CSV, flattening nested keys and handling missing fields…

05

CSV to JSON Converter

Turns CSV or TSV into a JSON array of objects, with type detection for numbers and booleans.

06

JSON to XML Converter

Converts JSON into well-formed XML with a configurable root element and array item naming.

07

XML to JSON Converter

Parses XML and converts it to JSON, preserving attributes and handling repeated elements as…

08

JSON to YAML Converter

Converts JSON to clean YAML with correct indentation, quoting and multi-line string handling.

09

YAML to JSON Converter

Parses YAML and outputs equivalent JSON, with support for anchors, lists and nested maps.

10

JSON Escape and Unescape

Escapes a string for safe embedding inside JSON, and unescapes a JSON string back to plain text.