Skip to content
Aback Tools Logo

Text Compression Tools

Compress text using GZIP, LZ-String, and other algorithms — output as Base64, URL-safe strings, or localStorage-optimised formats. All processing happens locally in your browser.

Text Compressors

38 tools

LZ-String Text Compressor
Compress text using LZ77/LZ-String — ideal for localStorage, cookies, and URL state. Base64, UTF-16 (localStorage-optimised), and URI Component output. Decompression mode included. Free online LZ-String compressor.
LocalStorage Compression Helper
Compress a JSON object or string before storing in localStorage — shows space saved, UTF-16 char count, and % of 5 MB browser limit used. Ready-to-use code snippet included. Free online localStorage compression helper.
IndexedDB Payload Size Estimator
Estimate IndexedDB storage usage for JSON payloads using the structured clone algorithm — shows how much LZ-String compression reduces quota usage. Four-way size comparison with code snippet. Free online IndexedDB payload size estimator.
Cookie Data Compressor
Compress cookie value strings using LZ-String and instantly see whether the compressed value fits within the 4096-byte browser cookie limit. Real-time size bar, Set-Cookie header preview, Base64 and URI Component output. Free online cookie compressor.
Text Compressor (Base64 Output)
Compress any text with GZIP and encode to Base64 — produces a URL-safe compressed string for query params, cookies, and localStorage. Free online text compressor.
CSS Compressor
Compress CSS by removing whitespace, comments, redundant semicolons, and applying shorthand optimizations — hex color normalisation, zero-value shortening, font-weight shorthand. Free online CSS compressor.
HTML Compressor (Aggressive)
Maximum HTML compression — removes all optional whitespace, collapses boolean attributes, strips comments, removes optional closing tags, and inlines style/script whitespace. Free online aggressive HTML compressor.
Inline Asset Compressor
Compress inline SVGs, base64 images, and JSON data blocks embedded in HTML — shows per-asset savings and replaces each asset in the output HTML. Free online inline asset compressor.
CSS Compressor (Advanced)
Advanced CSS compression — merges duplicate selectors, removes vendor prefix duplicates, collapses shorthand properties, and strips all whitespace and comments. Free online advanced CSS compressor.
XML Compressor
Strip whitespace, comments, and CDATA sections from XML — configurable options, shows byte savings and compression ratio. Free online XML compressor.
CSV Compressor
Remove blank lines, trailing whitespace, and unnecessary quoting from CSV — configurable options, shows byte savings and row count. Free online CSV compressor.
Rust Compressor
Strip comments and whitespace from Rust source files — preserves raw string literals (r"...", r#"..."#) and doc comments (///, //!). Free online Rust compressor.
GraphQL Compressor
Remove whitespace and comments from GraphQL schema and query files — single-line collapse mode for persisted queries, shows wire-size savings. Free online GraphQL compressor.
GraphQL Response Compressor
Minify GraphQL query strings and estimate wire size with and without GZIP — four-way size comparison (plain/GZIP × original/minified), single-line APQ mode. Free online GraphQL response compressor.
TypeScript Compressor
Strip TypeScript type annotations, interfaces, type aliases, and generics to produce clean JavaScript — shows compiled JS size vs original TS size. Free online TypeScript compressor.
JSON Compressor (Whitespace Removal)
Remove all whitespace from JSON and show exact byte savings — also shows GZIP wire size for true API transfer savings. Validates JSON as a side effect. Free online JSON compressor.
Lottie JSON Compressor
Compress Lottie animation JSON files by removing hidden layers, unused assets, empty properties, and whitespace — shows per-optimization KB savings. Compatible with lottie-web, lottie-react, lottie-react-native. Free online Lottie JSON compressor.
JavaScript Compressor with Source Map
Minify JavaScript and generate a Source Map v3 file — download both the compressed .min.js and its .map file as a ZIP. Remove comments, collapse whitespace, remove console.log. Free online JS compressor with source map.
YAML Compressor
Remove comments and blank lines from YAML files — ideal for Kubernetes manifests, Helm charts, and CI/CD configs. Shows exact byte savings and line count reduction. Free online YAML compressor.
Markdown Compressor
Strip blank lines, trailing spaces, HTML comments, and optional syntax from Markdown files — shows byte savings and line count reduction. Free online Markdown compressor.
Go Compressor
Remove comments and blank lines from Go source files — preserves raw string literals, interpreted strings, and rune literals. Shows byte savings and line count reduction. Free online Go compressor.
Terraform HCL Compressor
Remove comments and blank lines from Terraform HCL files — preserves heredoc strings and template expressions. Shows byte savings and line count reduction. Free online Terraform HCL compressor.
Apache Config Compressor
Strip comments and whitespace from Apache .htaccess and httpd.conf files — preserves RewriteRule patterns. Shows byte savings and line count reduction. Free online Apache config compressor.
.htaccess Compressor
Remove comments and blank lines from .htaccess files — preserves RewriteRule patterns, shows byte savings, and includes directive analysis (RewriteRules, security headers, cache directives). Free online .htaccess compressor.
YAML to Compact JSON Compressor
Convert YAML to minified JSON — typically 20–40% smaller wire size for configuration delivery APIs. Uses js-yaml for accurate parsing. Multi-document YAML support. Free online YAML to compact JSON compressor.
PHP Compressor
Remove comments and whitespace from PHP scripts — preserves heredoc/nowdoc strings, shows size reduction and compression ratio. Free online PHP compressor.
C/C++ Compressor
Strip comments and whitespace from C and C++ source files — preserves string literals, character literals, C++11 raw strings, and preprocessor directives. Shows byte savings and line count reduction. Free online C/C++ compressor.
TSV Compressor
Compress TSV files by removing blank lines and normalizing whitespace — shows exact byte savings, row count reduction, and validates column consistency. Free online TSV compressor.
Swift Compressor
Remove comments and excess whitespace from Swift source files — preserves raw strings, multi-line strings, and nested block comments. 6 configurable options. Free online Swift compressor.
Kotlin Compressor
Strip comments and blank lines from Kotlin source files — removes single-line, multi-line, and KDoc comments while preserving string literals. Shows size savings and line count reduction. Free online Kotlin compressor.
R Script Compressor
Strip comments and excess whitespace from R scripts — preserves string literals, removes # comments, blank lines, and trailing whitespace. Shows size reduction and line count savings. Free online R script compressor.
Dockerfile Compressor
Consolidate RUN layers, remove comments, and compress Dockerfiles — reduces Docker image layer count and shows estimated layer size impact. Free online Dockerfile compressor.
TOML Compressor
Remove comments and blank lines from TOML config files — preserves all string literals and multi-line strings. Useful for embedded device configuration and CI/CD pipelines. Free online TOML compressor.
Nginx Config Compressor
Remove comments and excess whitespace from Nginx config files — preserves string literals, shows size savings for config management repos. Free online Nginx config compressor.
robots.txt Compressor
Strip comments, blank lines, and trailing whitespace from robots.txt files — shows exact byte savings, directive count, and User-agent group count. Free online robots.txt compressor.
Source Code Compressor (Multi-language)
Paste code in any language and auto-detect syntax to apply the correct comment/whitespace stripping — supports 28 languages including JS, Python, Go, Rust, Swift, SQL, YAML, TOML, and more. Free online multi-language code compressor.
WebSocket Message Compressor
Compress WebSocket message payloads using permessage-deflate (RFC 7692) simulation — shows exact byte savings and bandwidth impact at scale. Supports DEFLATE, GZIP, and zlib. Free online WebSocket compressor.
CSS Bundle Compressor
Upload a CSS bundle and compress it — shows minified size, exact GZIP size, and Brotli size with ready-to-use nginx and Apache server configuration snippets. Free online CSS bundle compressor.