How to resize an image on Mac with sips or a browser

Published

Here is how to resize an image on Mac with nothing extra installed: open Terminal and run sips -Z followed by the longest side you want in pixels, the file name, and --out with a new name. sips keeps the shape of the picture. If you would rather not use Terminal, a browser resizer does the same job in Safari, and the file stays on your Mac.

Abstract flat illustration of violet cubes with small squares floating around them on a pale background

Resize the image in your browser

sips is the Scriptable Image Processing System in macOS (ss64.com sips reference). It runs in Terminal, so there is nothing to download. This page shows the sips commands, the pixel and ppi maths behind them, and the browser route.

How do you resize an image on a Mac?

Run one sips command in Terminal, or drop the file into a browser resizer. For the Terminal route, follow these steps:

  1. Open Terminal. Apple's Terminal User Guide says: In the Finder, open the /Applications/Utilities folder, then double-click Terminal.
  2. Type cd, a space, and drag the folder that holds the photo into the window, then press Return.
  3. Check the current size with sips -g pixelWidth -g pixelHeight photo.jpg.
  4. Run sips -Z 1200 photo.jpg --out photo-small.jpg, with your own file name and longest side.
  5. Check the new file with the same sips -g command as in step 3.

Pitfall: always give --out a new name if you might need the full-size photo later.

Should you change the pixels or only the ppi?

Change the pixels when you want a smaller file or need to meet an upload limit. Change only the ppi when you want a different print size and the same pixels. Guides disagree on this because they answer two different goals. The worked example below runs one phone-sized photo through both paths.

Worked example: one phone-sized photo, first with only the ppi changed, then resampled to fewer pixels. All numbers are arithmetic from the stated dimensions.
Starting photo
  Pixels:      4032 x 3024  = 12,192,768 pixels (about 12.2 megapixels)
  Resolution:  72 ppi (assumed here; read yours with: sips -g dpiWidth photo.jpg)
  Print size:  4032 / 72 = 56 in  by  3024 / 72 = 42 in

Path A: ppi changed to 300, pixels kept
  Pixels:      4032 x 3024  = 12,192,768 pixels (unchanged)
  Print size:  4032 / 300 = 13.44 in  by  3024 / 300 = 10.08 in
  File:        same pixels, so roughly the same file size
  Use it for:  printing at a set size; uploads see no difference

Path B: resampled, longest side set to 1200 px, shape kept
  Height:      3024 x (1200 / 4032) = 900 px
  Pixels:      1200 x 900   = 1,080,000 pixels
  Share kept:  1,080,000 / 12,192,768 = 8.9% of the original pixels
  Print size:  at 72 ppi, 1200 / 72 = 16.67 in by 900 / 72 = 12.5 in
  Use it for:  email, web pages, upload limits, smaller files
Path B in Terminal (fits the longest side to 1200 px):
  sips -Z 1200 photo.jpg --out photo-1200.jpg
  -> 4032 x 3024 becomes 1200 x 900

Path A in Terminal (changes ppi, keeps every pixel):
  sips -s dpiWidth 300 -s dpiHeight 300 photo.jpg --out photo-300ppi.jpg
  -> still 4032 x 3024, now 13.44 x 10.08 in when printed

The lesson from the example: ppi (pixels per inch) only tells a printer how large to print each pixel. A web page, a chat app or an upload form looks at the pixel count, so Path A changes nothing for them. Path B is the one that makes the file smaller. If you want a smaller file in KB at the same pixel size, compress it instead with the OptiPix Image Compressor.

How do you keep the aspect ratio when resizing?

Give sips one number with the capital -Z option, and it works out the other side from the original shape, as in Path B above. The ss64 sips reference describes the option as one that will Resample image so height and width aren’t greater than specified size (ss64.com sips reference). The lower-case sips -z takes a height and a width, and the same reference warns that with it the Image apsect ratio may be altered (the typo is in the source). If the two numbers do not match the original shape, the picture looks stretched or squashed.

How do you resize many images at once on a Mac?

Give sips a wildcard such as *.jpg and a folder for the results. The --out option accepts a result-file-or-dir (ss64.com), so every resized copy goes to a separate folder and the originals stay as they were:

cd ~/Desktop/photos
mkdir resized
sips -Z 1200 *.jpg --out resized

In the browser, the OptiPix Image Resizer page says Batch resizing is supported, so you can run a set of photos through the same settings without Terminal.

How to resize an image on Mac from the Terminal, with an exact size?

Use sips -z with the height first and the width second when a form asks for an exact size. Add --out with a new name so the result goes to a new file.

# Fit the longest side to 1200 pixels, keep the ratio, write a new file
sips -Z 1200 photo.jpg --out photo-small.jpg

# Set an exact size: height first, then width (the ratio can change)
sips -z 900 1200 photo.jpg --out photo-exact.jpg

# Check the pixel size and the ppi before and after
sips -g pixelWidth -g pixelHeight -g dpiWidth photo.jpg

The ss64 reference lists pixelWidth integer (read-only), so sips reports the pixel width but does not let you type a new one directly; you change it with the resample options. The resolution key, dpiWidth float, can be set with -s, which is how the Path A command in the worked example changes ppi without touching the pixels.

Is resizing the same as cropping?

No. Resizing scales the whole picture up or down, so everything stays in the frame. Cropping cuts away the edges and keeps only part of the picture. When you need a set shape, such as a square from a landscape photo, crop to that shape first, then resize.

Making an image larger is the other trap. Resizing up spreads the same detail over more pixels, so it looks soft. The OptiPix resizer page puts it plainly: enlargements beyond ~150% soften noticeably (OptiPix Image Resizer).

Can you resize an image on a Mac without Terminal?

Yes. A browser tool works in Safari with no download. If you would rather not open Terminal, the OptiPix Image Resizer does the same resize in Safari and keeps the file on your Mac: the page says The resize runs locally in your browser at full quality with no upload. It maintains aspect ratio by default, so typing one side gives the matching other side.

The upload box on the page lists JPEG, PNG, WebP, HEIC, AVIF, TIFF (as of 1 December 2026). If a site you upload to wants JPEG and your photo is a HEIC file, the OptiPix HEIC to JPG converter makes the JPEG copy.

All 131 Tools

Image CompressorBackground RemoverVideo CompressorImage UpscalerOCR Text ExtractorFormat ConverterImage ResizerEXIF RemoverFace BlurDepth EstimationQR Code GeneratorWatermark MakerColor Palette ExtractorPhoto FiltersImage to PDFObject DetectionImage ClassifierImage CaptionerAI Image GeneratorMeme GeneratorGIF MakerPhoto Collage MakerImage CropPhoto EffectsImage to SVGColor ChangerNoise RemoverPhoto RestorationColor PickerFavicon GeneratorImage to Base64Image Metadata ViewerImage AnnotatorPassport Photo MakerDocument ScannerASCII Art GeneratorImage ComparisonSprite Sheet GeneratorObject RemoverPanorama MakerWord CounterCase ConverterLorem Ipsum GeneratorUUID GeneratorText DiffURL Encoder / DecoderHTML Entity Encoder / DecoderBase64 Text Encoder / DecoderText to Binary / Hex / OctalHash GeneratorJSON Formatter / ValidatorRandom String GeneratorCSV ↔ JSON ConverterMarkdown EditorUnit ConverterPercentage CalculatorBMI CalculatorAge CalculatorTip CalculatorCSS Gradient GeneratorCSS Box Shadow GeneratorCSS Border Radius GeneratorGlassmorphism GeneratorNeumorphism GeneratorCSS Text Shadow GeneratorFlexbox PlaygroundCSS Grid GeneratorAudio TrimmerAudio ConverterAudio MergerAudio RecorderVideo to Audio ExtractorAudio Speed ChangerAudio Volume BoosterRingtone MakerVocal RemoverText to SpeechSpeech to TextAudio Noise RemoverAudio EqualizerAudio EffectsVideo TrimmerVideo MergerVideo ResizerVideo Speed ChangerVideo RotatorVideo to MP4 ConverterAdd Music to VideoMute VideoVideo LooperReverse VideoVideo ScreenshotAdd Subtitles to VideoVideo WatermarkScreen RecorderWebcam RecorderSlideshow MakerVideo FiltersCron Expression BuilderRegex TesterUnix Timestamp ConverterHEIC to JPG ConverterWebP to JPG ConverterWebP to PNG ConverterPNG to JPG ConverterJPG to PNG ConverterCompress PDFPDF to JPG ConverterPDF to PNG ConverterMerge PDFSplit PDFRotate PDFJPG to PDF ConverterJPG to WebP ConverterPNG to WebP ConverterVideo to GIF ConverterAVIF to JPG ConverterTIFF to JPG ConverterSVG to PNG ConverterPNG to ICO ConverterGIF to MP4 ConverterWebM to MP4 ConverterMP4 to MP3 ConverterJSON to CSV ConverterBase64 to Image ConverterJFIF to JPG ConverterAVIF to PNG ConverterGIF to PNG ConverterMKV to MP4 ConverterMP4 to WebM ConverterMP4 to WAV Converter