Skip to content

Cropper.js

A JavaScript library for cropping images in the browser.

Stars
13.9k
Forks
2.4k
Licence
MIT
Language
TypeScript
Last update
21 days ago
Type
Library

What it is

Cropper.js is a JavaScript library that lets a web page show an image with an adjustable crop box, so a user can select the part of a picture they want. Developers add it to their websites or web apps to handle the cropping interface. The README is brief and mostly points to the project website for details.

  • Let a user crop a profile photo before uploading it
  • Add a crop step to an image upload form
  • Build a custom image editor that uses a crop box

Great for

  • Web developers adding image cropping to a site or web app
  • Projects that need a free, MIT-licensed cropping component
  • Teams already working in JavaScript or TypeScript

Not ideal for

  • Non-developers who want a ready-made cropping tool, since this is a code library rather than an app
  • Projects that need the v1.x API, because this README covers the v2.x branch and v1.x lives on a separate branch
Step-by-step guide: how to use Cropper.jsInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js (version not stated in README)

    Clone the repository

    git clone https://github.com/fengyuanchen/cropperjs.git
  2. 2

    Run it

    • Read the project website for usage documentation: https://fengyuanchen.github.io/cropperjs/
    • Add the library to your page or project, following the website instructions
    • Attach it to an image element and test the crop box in your browser
  3. 3

    Get the most out of it

    • Check the project website for the full list of options and methods
    • Use the npm package (cropperjs) to get version updates through your package manager
    • Review the Conventional Commits and Semantic Versioning notes if you plan to contribute or track releases

Downloads

Strengths

  • Free and open source under the MIT license
  • Widely used, with about 13,900 GitHub stars
  • Written in TypeScript and actively maintained, with a recent push and a v2.3.1 release

Trade-offs

  • The README is short, so usage details must be found on the project website
  • Only the v2.x branch is described here, so v1.x users need a separate reference

How it compares

ProjectStarsTypeLevelUpdatedBest for
cropperjs (this)13.9kLibraryintermediate21 days agoWeb developers adding image cropping to a site or web app
smartcrop.js13kLibrarybeginner2.6 years agoWeb developers who generate thumbnails from user-uploaded photos
filepond16.4kLibraryintermediate9 days agoWeb developers who need a polished upload widget in a site or app
caire10.9kCLIintermediate7 days agoDevelopers who need to resize images inside a Go program
supervision51.5kLibraryintermediate4 days agoPython developers building apps on top of object detection or segmentation models
albumentations15.3kLibrarybeginner1.4 years agoMachine learning engineers training image classification or segmentation models with limited data

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.