# PDF Deskew

Automatically detect and correct skewed (tilted) PDF pages. Preserves text pages as searchable vector content and only rasterizes image pages (e.g. scans).

> Canonical page: https://elysiatools.com/en/tools/pdf-deskew

- **Category:** PDF Tools

- **Keywords:** pdf, deskew, skew, straighten, tilt, align, rotate, correct, scan

## Overview

Straighten tilted PDF pages using a pure-JavaScript pipeline (no external binaries required).

**Per-page content-aware processing (important):**
- **Image pages** (scanned documents): rasterized, skew detected and corrected. This is where deskew matters and rasterizing is harmless.
- **Text pages** (including mixed text + image): copied verbatim. Vector text, fonts, and searchability are fully preserved. True skew of vector text is rare — if a whole page is rotated by 90/180/270°, use the PDF Rotate tool instead.
- **Empty pages**: copied verbatim.

Optionally, you can force rasterization of text pages via "Rasterize Text Pages" if you genuinely need to deskew vector content.

**How it works (image pages):**
1. Each image page is rasterized with pdf.js
2. Skew angle is detected via horizontal projection-profile variance
3. The page image is rotated to correct the tilt
4. A new PDF is assembled

**Modes:**
- **Auto**: detect skew automatically (±15° range, 0.5° resolution)
- **Manual**: apply a fixed correction angle

## Inputs

- **PDF File** (file): Upload a PDF file
- **Mode** (select)
- **Manual Angle (degrees)** (number): Manual correction angle (degrees). Positive value corrects a clockwise tilt. Only used in Manual mode.
- **Auto-Detect Threshold (degrees)** (number): Minimum detected skew angle (in degrees) required to apply correction in Auto mode. Smaller values detect subtle tilts.
- **Rasterize Text Pages** (select): By default text pages are preserved as searchable vector content (not deskewed). Enable this only if you need to deskew vector text content, accepting loss of text selectability.
- **Page Range** (text): Specify pages to deskew (e.g., 1-3,5,7-9). Leave blank to process all pages.

## When to use

- When scanned PDF documents or digitized contracts are tilted, making them difficult to read or process.
- When you need to straighten skewed pages in a PDF while keeping the searchable vector text intact on non-skewed pages.
- When you want to apply a specific, uniform rotation angle to correct a known tilt on select pages of a document.

## How it works

- The tool analyzes the PDF page by page to distinguish between vector text pages and rasterized image scans.
- For image pages, it detects the skew angle within a ±15° range using horizontal projection-profile variance.
- It rotates the tilted image pages to correct the alignment while copying text and empty pages verbatim to preserve searchability.
- The corrected pages are reassembled into a single, straightened PDF document ready for download.

## Use cases

- Straightening scanned paper contracts or invoices that were fed crookedly into a document scanner.
- Preparing scanned PDF books or archives for optical character recognition (OCR) by aligning the text lines horizontally.
- Manually adjusting the tilt of specific pages in a multi-page report using a precise correction angle.

## Frequently asked questions

### Will this tool make my searchable PDF text unselectable?

No. By default, the tool preserves text pages as vector content. Only image-based pages are rasterized and deskewed.

### Can I force the tool to deskew pages that contain vector text?

Yes. You can set the 'Rasterize Text Pages' option to 'Yes', though this will convert those pages to images and remove text selectability.

### What is the maximum angle the auto-detect mode can correct?

The auto-detect mode can identify and correct skew angles within a range of ±15 degrees with a 0.5-degree resolution.

### How do I correct a specific page range instead of the whole document?

Enter the desired pages in the 'Page Range' field (for example, '1-3,5') to limit the deskew process to those pages.

### What does the auto-detect threshold option do?

It sets the minimum tilt angle required to trigger a correction, preventing unnecessary processing on pages with negligible skew.

## Related tools

- [PDF Secure Redaction Sanitizer](https://elysiatools.com/en/tools/pdf-secure-redaction-sanitizer): Permanently remove PDF text and hidden page objects by rebuilding an image-only PDF.
- [PDF Add Signature Online](https://elysiatools.com/en/tools/pdf-add-signature-online): Add a visible typed or image signature block to selected PDF pages and download the signed copy
- [PDF Denoise](https://elysiatools.com/en/tools/pdf-denoise): Remove visual noise from scanned PDF pages — salt-and-pepper speckle, random grain, and faint background haze — using real image-processing algorithms. Text pages are preserved as searchable vector content.
- [PDF Poster Maker](https://elysiatools.com/en/tools/pdf-poster-maker): Create poster/flyer PDF templates with headline, background image, gradients, and CTA button text
- [PDF Batch Compress](https://elysiatools.com/en/tools/pdf-batch-compress): Compress multiple PDF files with image downsampling and optimization, packaged as ZIP
- [PDF Rasterize Pages](https://elysiatools.com/en/tools/pdf-rasterize-pages): Render PDF pages into high-fidelity image sequences (PNG/JPG/WebP) with configurable DPI and page range
- [Barcode Batch Generator](https://elysiatools.com/en/tools/barcode-batch-generator): Batch generate Code 128, EAN-13, UPC-A, ITF-14, QR Code, and Data Matrix outputs from CSV or multiline text
- [PDF OCR Text Layer](https://elysiatools.com/en/tools/pdf-ocr-text-layer): Add searchable/copyable OCR text layer to scanned PDF using Tesseract

## Samples

- [PDF Samples](https://elysiatools.com/en/samples/pdf-samples): Generated PDF samples from tools dated 2026-02-01 to 2026-02-10
- [Markdown Slide Deck Samples](https://elysiatools.com/en/samples/md-slide-deck-to-pdf): Remark/Marp style Markdown slide decks for testing PDF export layouts
- [WebRTC Real-Time Communication Samples](https://elysiatools.com/en/samples/webrtc-samples): Comprehensive WebRTC samples for peer-to-peer audio/video communication, data channels, screen sharing, and signaling server implementation
- [Docker Image Tag Samples](https://elysiatools.com/en/samples/docker-image-tag): Collection of Docker image references with various registries, repositories, tags, and digests

## Related content

- [PDF Archival, Accessibility, and Trust Review](https://elysiatools.com/en/hubs/pdf-archival-accessibility-trust): Clean scanned pages, add OCR, prepare PDF/A files, inspect accessibility structure, add bookmarks, and verify signatures before archival handoff.
