Image Cropper - Crop & Rotate Images Online
Crop, rotate, flip, and convert images with preset aspect ratios for social media. 100% client-side — no images uploaded to any server.
Frequently Asked Questions
What is an image cropper and why do I need one?
An image cropper is a tool that lets you select and extract a specific rectangular region from an image, removing unwanted borders, backgrounds, or distracting elements. Cropping is essential for preparing images for social media (each platform has specific aspect ratio requirements), creating focused thumbnails, improving photo composition, and trimming screenshots to show only relevant content. Unlike resizing, which changes the overall dimensions, cropping removes parts of the image to highlight the area that matters.
How do I use this image cropper tool?
1. Drag and drop your image onto the upload area, or click to browse your files. 2. Once the image loads, drag to position and use the handles to adjust the crop area. 3. Optionally, choose a preset aspect ratio (1:1 for square, 16:9 for widescreen, etc.) to lock the crop proportions. 4. Use rotation or flip controls if needed to straighten or mirror the image. 5. Choose your preferred output format (PNG, JPEG, or WebP) and quality level. 6. Click 'Apply Crop' to generate the cropped image, then 'Download' to save it.
Is my image data safe? Are images uploaded to a server?
Your images are 100% safe and never leave your browser. All cropping is performed client-side using the HTML5 Canvas API. No image data is transmitted to any server, making this tool completely private. You can verify this by checking your browser's Network tab — no upload requests are made.
What aspect ratios are available for cropping?
The tool provides preset aspect ratios in two categories. Standard ratios include: 1:1 (square), 4:3 (classic), 3:2 (film), 16:9 (widescreen), and 16:10 (wide). Social media ratios include: Instagram Portrait (4:5), Instagram Story (9:16), Facebook Post (1.91:1), Facebook Cover (2.63:1), and Twitter/X Header (3:1). You can also enter a custom ratio or use free-form cropping with no ratio constraint.
What image formats are supported?
This tool accepts PNG, JPEG, WebP, and GIF images as input. For output, you can export as PNG (lossless, with transparency), JPEG (lossy with quality control, no transparency), or WebP (lossy with transparency). GIF input is supported but only the first frame is extracted. You can also convert between formats during cropping — for example, crop a JPEG and save it as a PNG.
What is the difference between cropping and resizing?
Cropping removes parts of an image by selecting a region to keep, resulting in a smaller canvas with only the content you selected. The pixels within the crop area remain at their original resolution. Resizing changes the overall dimensions of the entire image by scaling all pixels. If you need to both crop and resize, crop first to select the important area, then use the Image Resizer tool to scale to specific pixel dimensions.
Can I rotate or flip my image before cropping?
Yes. The tool includes 90-degree clockwise and counter-clockwise rotation buttons for quick orientation changes, a fine rotation slider (-45 to +45 degrees) for straightening slightly tilted photos, and horizontal/vertical flip controls. All transforms are applied before the crop, so you can straighten a tilted horizon and then crop to the exact area you want.
What is the maximum file size and resolution supported?
This tool supports images up to 50MB per file and resolutions up to 16384 x 16384 pixels (the Canvas API limit in most browsers). On mobile devices, the maximum resolution may be lower due to memory constraints. The cropping operation itself is very fast since it only copies a region of the image.
Code Examples
// Client-side image cropping using Canvas API
async function cropImage(file, cropX, cropY, cropWidth, cropHeight, options = {}) {
const { quality = 0.92, format = null } = options;
return new Promise((resolve, reject) => {
const img = new Image();
const url = URL.createObjectURL(file);
img.onload = () => {
URL.revokeObjectURL(url);
const canvas = document.createElement('canvas');
canvas.width = cropWidth;
canvas.height = cropHeight;
const ctx = canvas.getContext('2d');
const outputType = format || file.type || 'image/png';
if (outputType === 'image/jpeg') {
ctx.fillStyle = '#ffffff';
ctx.fillRect(0, 0, cropWidth, cropHeight);
}
ctx.drawImage(
img,
cropX, cropY, cropWidth, cropHeight,
0, 0, cropWidth, cropHeight
);
canvas.toBlob(
(blob) => {
if (!blob) { reject(new Error('Crop failed')); return; }
resolve({
blob,
width: cropWidth,
height: cropHeight,
originalWidth: img.naturalWidth,
originalHeight: img.naturalHeight,
});
},
outputType,
outputType === 'image/png' ? undefined : quality
);
};
img.onerror = () => { URL.revokeObjectURL(url); reject(new Error('Failed to load')); };
img.src = url;
});
}
// Crop to center square
const input = document.querySelector('input[type="file"]');
input.addEventListener('change', async (e) => {
const file = e.target.files[0];
const img = new Image();
img.src = URL.createObjectURL(file);
await new Promise((r) => (img.onload = r));
const size = Math.min(img.naturalWidth, img.naturalHeight);
const x = Math.round((img.naturalWidth - size) / 2);
const y = Math.round((img.naturalHeight - size) / 2);
const result = await cropImage(file, x, y, size, size, { format: 'image/png' });
console.log(`Cropped: ${result.width}x${result.height}`);
const url = URL.createObjectURL(result.blob);
const a = document.createElement('a');
a.href = url; a.download = 'cropped.png'; a.click();
URL.revokeObjectURL(url);
});