Skip to content
Vitali Web Tools
All toolsFavorites
Categories
DevicesTextDeveloperCalculatorsImagesAudio & VideoFiles & DataOffice & PlanningPDFCodes & Templates
Contact & feedback
Vitali Web Tools
Vitali Web Tools
Collapse sidebar
Tool library
FavoritesAccount
All tools/Images/Compress an image for upload

Compress an image for upload

Share tool
Share this tool

Only this public address is included. Your files, inputs and results stay out of the link.

Choose an image, enter the form’s maximum file size, format and pixel requirements, then download a verified result. Processing stays on your device; an unreachable target is clearly reported.

Preparing your tool…

Processed on your deviceFree · No account needed
Instructions, examples & details

A visual example

Two limits, two separate checks

A square upload can keep the full picture or deliberately crop it.

  1. 400 × 400 pxFull picture + padding
    01

    Keep the full picture

    For a 1,600 × 900 source and an exact 400 × 400 target, padding preserves the entire image.

  2. 400 × 400 pxSelected square crop
    02

    Or choose a crop

    A square crop fills the target. Check which parts at the sides are left out before processing.

    • Checked: Exact 400 × 400 target
    • Unchecked: Byte limit still to check
    03

    Then check the file size

    A 200 KB ceiling means 200,000 bytes. Only the actual export can show whether that target is met.

Exact dimensions stay fixed, even when the requested byte limit cannot be reached.

Illustrative example. Schematic picture example, not your file or a promised compression result. KB and KiB are different units.

Read the practical guide and worked example

How to use it

  1. 1Start with the image upload requirements. The separate quality-only and PDF workflows remain available in the workflow selector.
  2. 2Select the source or a synthetic example. For images, confirm format, maximum bytes and whether pixel dimensions are maximum bounds or exact width and height.
  3. 3Keep the full image with padding, or explicitly choose and review a crop. Choose white/black background, or transparency for PNG/WebP. For PDF, explicitly confirm the separate image-only rebuild.
  4. 4Process and compare the actual encoded preview with the original. Download only a passing result; revise an unreachable target and retry.

200 KB is exactly 200,000 bytes; 200 KiB is 204,800 bytes. For an exact 400 × 400 output, preserve the full image with padding or explicitly crop to the square. A failed byte target never silently reduces those exact pixels.

Details & limits

Upload-limits images: PNG/JPEG/WebP and supported HEIC/AVIF up to 10 MiB / 20 MP / 8,192 px. Keep the full image with padding or explicitly crop; exact pixel sizes stay fixed. This mode reopens image exports to check format, pixels and bytes. Simple compression accepts PNG/JPEG/WebP within the same input limits, checks the output header for format and dimensions, and displays the actual size. PDF: up to 10 MiB / 10 pages, rebuilt as image-only pages after explicit confirmation.

Can every upload limit be met?

No. In upload-limits mode, images use at most 24 encoding attempts; only maximum-bound mode may try smaller dimensions when you allow it. Exact width and height remain fixed. Padding is the default, cropping is explicit, and the workflow does not upscale. JPEG needs a white or black background. Supported HEIC/AVIF still inputs reuse the bounded decoder path; output encoders are probed, and unsupported animation or multi-image variants are rejected. This mode reopens image exports to check format, pixels and bytes. Simple compression checks the output header for format and dimensions and displays its actual size. Source metadata is not copied, but 8-bit sRGB export does not guarantee HDR, ICC or wide-gamut preservation. The separate PDF mode uses at most six attempts and loses searchable text, vectors, forms, links, attachments and signatures while retaining page order and physical dimensions. Passing technical limits does not guarantee acceptance by every portal.

Target file size, pixels and a checked result

The upload-limits workflow opens first. Set a target such as 50 KB, 100 KB, 200 KB or 1 MB: KB means 1,000 bytes, while KiB means 1,024. Keep the full image with padding or explicitly choose a crop. Exact pixel dimensions remain fixed; smaller dimensions require permission. The bounded compression search may miss very small targets. This upload-limits mode decodes exports again to check format, pixels and actual bytes. The simple ‘Compress an image by quality’ mode checks the output file header for format and dimensions and displays its actual size. A separate PDF mode rebuilds up to 10 pages as images, with confirmation of the lost document features.

Match the requirement that actually blocks your upload

An upload can fail because of file size, pixel dimensions or format. These are separate requirements: lowering JPEG quality changes encoded bytes but does not turn a landscape picture into the required portrait shape. Read the destination's requirements before choosing a mode.

A photo must be under 150 KB

Use the upload-limits mode for a definite byte ceiling, rather than guessing a quality percentage in simple compression. A 150 KB ceiling means 150,000 bytes; 150 KiB means 153,600. Use the unit actually requested. If the portal also specifies a format, select that format even if another one could make a smaller file.

The upload also needs exactly 450 × 600 pixels

For a 1,200 × 800 landscape source, keeping the full image places a 450 × 300 picture inside that portrait canvas, with space above and below. Cropping fills the canvas but removes part of the source. Choose based on whether losing the edges is acceptable, then inspect the subject's placement. Exact dimensions remain fixed while the tool tries to meet the byte target.

Check your result

  • Read the actual exported byte size and pixel dimensions together; a smaller-looking preview is not a size measurement.
  • Check small lettering, faces and crop edges in the encoded result, not only in the original preview.
  • Keep the original and try the result at its intended destination; meeting the entered technical limits does not validate unrelated portal rules.

If something looks wrong

No result meets the byte ceiling

Review which requirement can change. Permit smaller dimensions only if the destination accepts them, or use another permitted format. Repeating the same exact-size request cannot guarantee a smaller result.

A transparent logo gets a background

JPEG cannot retain transparency. Use PNG or WebP if accepted, or deliberately select a suitable solid background and check the edges against it.

Related tools

AI Background RemoverImage ResizerImage ConverterCompress PDF
© Vitali Web Tools
Guides & examplesPrivacyTermsImprintContact

Up to 10 MiB · 20 megapixels · 8,192 px per side

Try a worked example

Synthetic 960 × 640 image. Try JPEG, 200 KB, maximum 800 × 600 px and 4:3. The actual export must meet all selected limits; byte size varies by browser.

Open example in a new tab

Your selected files stay here. In the new tab, choose Use example.

Checking available output formats…

Paste upload requirements
Confirmed output requirements

Presets change only the file-size limit.

1 KB = 1’000 B · 1 MB = 1’000’000 B · 1 KiB = 1’024 B · 1 MiB = 1’048’576 B

Current padding/transparency background: white. Change it under Advanced.

Advanced: ratio, background and smaller dimensions
Processing limits and colour

Source metadata is not copied. Orientation is applied once and verified. Exports use an 8-bit sRGB canvas; exact HDR, ICC and wide-gamut colour preservation is not promised. Animation, multiple main images and unsupported crop metadata are rejected. JPEG/WebP are lossy. At most 24 encoding attempts and 60 seconds per job.

Share these upload requirements

The link contains only format, byte and pixel settings. It never includes your image, filename, pasted text or result.

Optional browser-agent access

This experimental WebMCP pilot can describe public options and request the same local image workflow. File selection and download stay manual. Processing needs your visible confirmation; giving a result to an agent needs a separate preview and one-time approval.

Checking the optional browser interface…

Experimental browser support and requirements
Input formats and local decoder
  1. 1Choose an image
  2. 2Set upload requirements
  3. 3Check and download

Set the output format, pixel requirements and maximum bytes. PNG, JPEG, WebP and supported HEIC/AVIF still images stay on this device.

JPEG, PNG and WebP still images use the browser decoder. AVIF works only when this browser decodes the selected variant. HEIC uses the existing separately loaded LGPL decoder; neither HEIC/HEIF nor AVIF support covers every codec, bit depth or container variant.

HEIC decoder licences and source downloads

Saved presets below retain format, byte limit and maximum pixel bounds. Exact-size, crop and background choices stay in this session; restoring a preset returns to full-image white-padding mode.

Reuse settings

Output format, byte and pixel limits, ratio and permission to reduce dimensions.

Saved only when you choose Save. No files, names, cell contents or pasted text. Restoring never processes a file automatically.