Loading Base64 to LZ4 Decompressor...
Please wait a moment

How to Use the Base64 to LZ4 Decompressor - Step by Step Guide

Step 1

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:

•
Paste directly: Copy your Base64 encoded LZ4 data and paste it into the input editor
•
Upload a file: Click "Upload" to pick a text file that holds the Base64, or the .lz4 file itself
•
Try the sample: Click "Sample" to load example Base64 LZ4 data and see the decompression in action

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.

Step 2

Automatic Decoding & Decompression

There is no button to press. Half a second after you stop typing, the page:

•
Decodes Base64: Turns the text back into bytes. Line-wrapped and URL-safe Base64 and data: URIs work too
•
Decompresses the LZ4 frame: Reads the LZ4 frame format described on lz4.org
•
Checks the data: Verifies the checksums stored in the frame and tells you when the data is cut off or damaged instead of showing a partial result

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.

Step 3

Copy or Download Decompressed Data

Use your restored data wherever you need it:

•
Copy to clipboard: One click copies the decompressed text
•
Download as file: Saves the decompressed bytes exactly, as decompressed.txt for text, decompressed.bin for binary data, or under the uploaded file's name without .lz4
•
Process further: Use the restored data in your web applications

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.