Convert

Convert between PNG, JPEG, WebP and AVIF. The conversion runs on a canvas inside this tab — your file is never uploaded, there is no queue, and it keeps working with the network off.

Convert an image

Drop an image here

or choose a file — PNG, JPEG, WebP, AVIF, GIF or BMP

Higher keeps more detail and makes a bigger file.

Fills transparency when the target has no alpha channel.

Nothing here is uploaded. Open your network tab and watch — there is no request to make.

Arguments

The same arguments work in all three places — this page, the Assistant, and the Python package. This table is generated from the tool spec the code itself reads, so it cannot drift out of date.

Use It From Python or the Assistant

This page is one of three front ends over the same tool. Reach for whichever fits what you are doing.

From the THL library

Install once, then call the tool as an ordinary method. Every tool in the lab lives under the same package.

Install
pip install thehallucinatedlab
Convert a file
from thehallucinatedlab import convert result = convert( "photo.jpg", format="png", ) print(result.path, result.bytes)
Or from the command line
thl convert photo.jpg --format webp --quality 80 # plain english works too thl "convert photo.jpg to png"

From the Assistant

The Assistant understands these tools in plain english. Attach an image and say what you want — it runs the same conversion in your browser and hands back the file. No model download required.

Try saying
convert this to png make it a jpg at 80 quality png to webp, quality 75