Set a KB target and the engine finds the highest quality that fits it. Everything runs in your browser — nothing is uploaded.
The download is always a JPG, whatever you upload — hitting an exact file size only works with JPG's adjustable quality; PNG has no equivalent way to shrink toward a target.
The engine keeps full quality as long as it fits the budget, and only shrinks the image when a very small target genuinely requires it — it will never enlarge the photo.