⚡ Introducing Ubify Nexus: The all-in-one Operating System for YouTube Learners & Researchers.Claim 3 Months Free Pro →
Loading tool...
Find this tool helpful? Share it with a friend:
WhatsApp𝕏PostLinkedIn
100% Free & Private Online Utilities No Server Uploads

Explore our collection of 150+ developer tools, PDF editors, and image converters. Everything runs locally in your browser.

Ubify Core Engineering Team

SOFTWARE ENGINEERS & SYSTEMS ARCHITECTS

~2 min read
~368 words
VERIFIED NOVEMBER 2026
Verified for W3C & ECMA-404 Standard Compliance

About This Tool

The Document Deskewer straightens tilted document scans, slanted mobile receipts, and misaligned photographic captures using precision angular canvas rotation.

### How Canvas Deskewing Works When flatbed scanners or phone camera angles tilt a page, text lines slant across the page. This tool rotates the raster image to realign text horizontally: - **Trigonometric Bounding Box Expansion**: Standard rotation can crop the corners of rotated rectangles. The deskewer calculates the expanded bounding dimensions using absolute sine and cosine offsets: $$W_{\text{new}} = W \cdot |\cos(\theta)| + H \cdot |\sin(\theta)|$$ $$H_{\text{new}} = W \cdot |\sin(\theta)| + H \cdot |\cos(\theta)|$$ - **Paper Tone Background**: Fills newly created triangular corner margins with pure white (#FFFFFF) to match standard printer paper. - **Fine Angular Slider**: Allows decimal-degree tilt adjustments so you can dial in the exact alignment angle without quality loss.

### Worked Example Straightening a document tilted 2.5 degrees clockwise: 1. Upload a crooked scan (e.g., $1200 \times 1600$ px). 2. Set the Tilt Angle slider to **2.5°** to apply a counter-clockwise correction of $-2.5^{\circ}$. 3. The canvas resizes dynamically to encompass the rotated corners and renders the straightened page against a crisp white background. 4. Download the straightened PNG ready for OCR indexing or PDF compilation.

### Local In-Browser Processing Image loading, trigonometric canvas resizing, and pixel rotation execute strictly on your local computer using the HTML5 Canvas 2D API. Sensitive tax returns, medical bills, and legal contracts are never uploaded to any remote server.

How to Use

  1. 1

    Upload your crooked document scan or tilted receipt photo.

  2. 2

    Adjust the Tilt Angle slider until the text lines align horizontally with the grid.

  3. 3

    Inspect the live straightened preview with expanded paper borders.

  4. 4

    Download your deskewed, high-resolution document image as a PNG.

Frequently Asked Questions

Does deskewing crop or clip the corners of my document?

No. The canvas dynamically calculates expanded width and height using trigonometric bounds ($W\cos\theta + H\sin\theta$) so no corners or text are cut off.

What image formats can I upload for deskewing?

You can upload PNG, JPEG, WEBP, or SVG image files directly from your desktop or phone.

Are my private scanned documents uploaded to a cloud server?

No. All rotation and image processing occur 100% locally in your web browser memory.

    Document Deskewer — Straighten Tilted & Crooke | Ubify Tools