Staaarter

JPG Padding Remover

Uploads a JPG and crops a chosen uniform padding amount off of every edge, the exact inverse of JPG Padding Adder, then downloads the cropped result as a JPG. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-29
By Staaarter Team
editorpaddingcropcanvasjpg

Overview

Introduction

This tool crops a uniform padding amount off all four sides of a JPG, entirely client-side.

It's the exact inverse of JPG Padding Adder, provided as a matching 'padding'-named entry point for that pairing.

What Is JPG Padding Remover?

A client-side cropping tool that removes the same number of pixels from every edge of a JPG in one operation: the same underlying crop as JPG Border Remover, offered under the 'padding' name to match JPG Padding Adder.

It doesn't inspect pixel colors; it always removes exactly the amount you specify.

How JPG Padding Remover Works

The tool computes the output size as the original width/height minus twice the requested padding amount, then copies the corresponding interior pixels into a new, smaller buffer.

If the requested amount would leave nothing behind, the tool rejects the request with a clear error rather than producing a broken image.

When To Use JPG Padding Remover

Use it to undo padding added with JPG Padding Adder, or any time you need to trim a known, uniform amount off every edge of a JPG.

If the amount to trim is genuinely uneven per side, use JPG Margin Remover instead.

Features

Advantages

  • Runs entirely client-side.
  • Simple single-value input.
  • Exact inverse of JPG Padding Adder, so pairing the two round-trips cleanly.

Limitations

  • Uniform on all sides only.
  • Requires knowing the exact amount; doesn't auto-detect it.

Examples

Undo padding added earlier

Input

A 648x448 JPG padded by 24px

Output

The original 600x400 photo with the padding cropped away

The exact inverse of the JPG Padding Adder example that created it.

Trim a known uniform padding amount

Input

A 580x580 JPG with a 40px padding band on all sides

Output

The original 500x500 photo

Straightforward crop once the exact amount is known.

Best Practices & Notes

Best Practices

  • Double-check the exact amount that was added before cropping to avoid over- or under-trimming.
  • Keep a copy of the original file since cropping discards the removed pixels once downloaded.

Developer Notes

removeJpgPadding is a thin wrapper around removeJpgBorder: functionally identical crop math, exposed under the 'padding' name so it discoverably pairs with jpg-padding-adder.ts rather than requiring users to realize it's the same operation as jpg-border-remover.ts.

JPG Padding Remover Use Cases

  • Undoing padding added by JPG Padding Adder
  • Trimming a known uniform spacing amount from a photo
  • Cleaning up a template export's padding before reuse

Common Mistakes

  • Assuming this auto-detects the padding amount; it doesn't. Specify the exact value.
  • Requesting an amount larger than half the image's smaller dimension, leaving nothing to crop to.

Tips

  • For the same crop under different framing, JPG Border Remover does the identical operation.
  • For automatic detection instead of a known fixed amount, use JPG Empty Space Remover.

References

Frequently Asked Questions