Skip to converter

GZ to TXT — turning one compressed stream into text you can read

A rotated log arrives as app.log.gz and an editor cannot read it while compressed. This route decompresses one gzip payload in your browser and offers its bytes as a .txt download. It checks UTF-8 and disallowed control characters rather than identifying the original file type; a failed check produces an error instead of misleading text.

The gzip layer is removed; the gzip header name and mtime fields are not carried over.

Drop files here or GZ, up to 12 MB
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    Decompressing a single stream

    Native streaming decompression unwinds the gzip stream and the checksum is validated before the payload is offered as a file. Expansion is bounded while it runs, so a stream that inflates aggressively is stopped instead of filling memory.

    This is a decompression job, not a listing job — the output is the payload itself.

    How this route differs from archive listings

    What survives the decompression

    The payload bytes are preserved exactly; validation only decides whether the payload can be presented as text.

    • UTF-8 text is preserved byte for byte, including line endings.
    • The gzip checksum is validated, so a truncated or corrupt stream is reported rather than half-written.
    • Invalid UTF-8 and disallowed C0 control bytes are rejected. Ordinary tab, carriage return and line feed are allowed. These checks do not classify every possible binary format.
    • The gzip header's stored filename and timestamp are not carried into the output; the file is named from your input.
    • No metadata is restored and no content is classified.

    Why binary streams are refused

    A .gz file can hold anything. Decompressing a compiled object or an image and presenting it as .txt produces unreadable characters and invites someone to paste them into a document.

    The route accepts UTF-8 that passes its control-character check. It cannot prove a payload is meaningful prose; if it rejects, the bytes may be binary, another text encoding, or text containing unsupported control characters.

    Why the header name is not carried over

    The gzip header may store an original filename and a timestamp, and some tools write them, others leave them empty. Neither is reproduced in the output.

    If the original name matters, rename the downloaded text yourself; the payload is what this route guarantees.

    Reading the decompressed text

    One compressed file up to 12 MiB is accepted. Its decompressed payload must also fit the 8 MiB single-member limit and the 60x expansion ratio; the shared 32 MiB total does not allow a larger single text payload.

    1. Drop the .gz file into the studio — a single gzip stream, up to 12 MiB.
    2. Pick TXT as the output format.
    3. Let the decompression finish; expansion is bounded during the read.
    4. Open the .txt in an editor and search the lines you needed.
    5. If text validation fails, check the encoding and control characters as well as the possibility of binary data. A rejection alone does not identify the original file type.
    6. Rename the output if the gzip header's stored filename mattered to you.

    Compressed stream questions

    Is this the same as listing archive contents?
    No. Archive listings report entry names, kinds and sizes. This route has no entries: it decompresses one gzip stream and returns its payload as text.
    Does the output keep the original file's name?
    Not from the gzip header. The header's stored name and time are not preserved; the output is named from your input file.
    Why was my .gz rejected when it decompresses fine elsewhere?
    The payload must fit 8 MiB, the expansion ratio, valid UTF-8 and the supported control-character rules. Tab and line breaks are accepted; another text encoding or disallowed control characters can reject otherwise textual content.
    Is the log uploaded anywhere?
    No. The stream is decompressed inside the browser tab and the text is a file you download.

    Share this converter

    More sharing options