Base64 to LZ4 Decompressor: Decode and Decompress Data
Decode a Base64 string and decompress the LZ4 data inside it, for example a compressed field in an API response or a database column. No registration required.
How to Use the Base64 to LZ4 Decompressor - Step by Step Guide
Input Base64 Encoded Data
Start with your Base64 encoded LZ4 data. This page undoes both steps, which is handy for compressed fields in API responses, values read from a database, or compressed JSON payloads. You can get it in three ways:
Example: Base64 Encoded Input
Here's what Base64 encoded LZ4 data looks like. LZ4 frames start with the bytes 04 22 4d 18, so the Base64 nearly always begins with "BCJNGG":
BCJNGGxAQgAAAAAAAADuQAAAAMB7CiAgInVzZXIiOiAMAPIFICAiaWQiOiAiVVNSLTk4NzY1IiwXAEBuYW1lGQDwAUFsZXggQ2hlbiIKICB9Cn0AAAAA0p3z5w==
This string holds the small JSON document shown in Step 2.
Automatic Decoding & Decompression
There is no button to press. Half a second after you stop typing, the page:
Example: Decompressed Output
The Step 1 string decodes to this:
{ "user": { "id": "USR-98765", "name": "Alex Chen" } }
The bytes come back exactly as they were compressed, line breaks and indentation included.
Copy or Download Decompressed Data
Use your restored data wherever you need it:
Frequently Asked Questions
What is Base64 to LZ4 decompression?
It undoes two steps in one go. The Base64 text is decoded back into bytes, and those bytes are decompressed as an LZ4 frame to give you the data that was compressed in the first place. It is the reverse of compressing something with LZ4 and then Base64-encoding it so it can travel in JSON, a URL or a text column.
When would I need to use this tool?
Typical cases are an API or webhook that returns a compressed field as Base64, a cache or database row that stores LZ4 data as text, or a log line where someone pasted a compressed payload. If you have the .lz4 file itself rather than Base64, the Upload button reads it too.
Is my data sent anywhere?
No. Decoding and decompression run in your browser, and the page never uploads what you paste or the files you pick.
What if I get a decompression error?
The message says what is wrong: a character that isn't Base64 (with its line and column), "=" padding in the middle, data that is cut off, a checksum that doesn't match because the data is damaged, or input that is something else, such as JSON, plain text or GZIP data. Most of the time the string was not copied in full. To make test data of your own, use the LZ4 to Base64 converter.
Why does my LZ4 data from a database or library say it has no frame header?
This page reads the LZ4 frame format, the one the lz4 command-line tool and most LZ4 libraries write by default. Its Base64 usually starts with "BCJNGG". Calls like LZ4_compress_default write a raw LZ4 block with no header, no checksum and no stored size, and some databases store data that way. A raw block can't be told apart from other bytes reliably, so the page reports it instead of guessing.
Can I decompress regular Base64 data without LZ4?
No, this page expects LZ4 data inside the Base64. If the Base64 holds plain text, the error says so; use the Base64 decoder for that instead.
What happens if the decompressed data is not text?
It still decompresses, but bytes such as an image or a .tar archive can't be shown as text, so the output panel shows the size instead. Download saves the exact bytes, as decompressed.bin, or under the uploaded file's name without its .lz4 ending.
Is LZ4 decompression lossless?
Yes. LZ4 is lossless, so the decompressed bytes are exactly what was compressed. When the frame carries a checksum, the page checks it, and a mismatch is reported as damaged data instead of showing a result that might be wrong.
Related Tools
LZ4 Compressor
Compress text or a file with LZ4 in your browser and download the .lz4 file or its Base64
LZ4 Decompressor
Decompress an .lz4 file or LZ4 Base64 in your browser, with checksums checked
LZ4 to Base64
Compress data with LZ4 and get it as Base64 in one step, for APIs and database fields
Base64 Validator
Validate Base64 encoded strings with detailed format checking and content type detection
Image to Base64
Convert images to Base64 encoded strings for embedding in HTML, CSS, and APIs
Base64 to Image
Decode Base64 encoded strings to view and download images (PNG, JPG, GIF, SVG)