How to compress a PDF without losing accessibility tags

Shrink a tagged, accessible PDF while keeping its accessibility intact โ€” why some compression strips the tag tree, which methods preserve tags, and how to verify.

6 min read

How to compress a PDF without losing accessibility tags

By ScoutMyTool Editorial Team ยท Last updated: 2026-05-22

Introduction

You did the work to make a PDF accessible โ€” tagged structure, reading order, alt text โ€” and now you need it smaller, without throwing that away. The danger is that some ways of shrinking a PDF (flattening it, or โ€œprinting to PDFโ€) strip the tag tree and leave a smaller but inaccessible file. The good news: the data-only methods โ€” lossless optimisation and measured image compression โ€” shrink the file while leaving the structure (and alt text) intact. This guide explains which methods preserve accessibility, why flattening/rasterizing destroys it, the safe order to compress in, and how to verify the compressed PDF is still the accessible document you started with.

Methods, and whether they keep tags

MethodKeeps accessibility tags?
Lossless optimisation (recompress streams, subset fonts, dedup)Yes โ€” structure untouched
Downsample / re-encode imagesYes โ€” images change, tags stay (re-add image alt if needed)
Flatten the documentNo โ€” destroys tags (and interactivity)
Print-to-PDF / rasterizeNo โ€” produces an untagged (often image) PDF

Step by step โ€” shrink it, keep it accessible

  1. Keep the original. Work on a copy so the accessible original is your fallback if anything goes wrong.
  2. Run lossless optimisation first. Recompress streams, subset fonts, remove unused objects, deduplicate โ€” zero structural change. See lossless compression and Compress PDF.
  3. Add measured image compression if needed. Downsample over-resolution images, re-encode photos sensibly โ€” alt text (in the tags) is unaffected.
  4. Do NOT flatten or print-to-PDF. Those strip the tag tree (and rasterize text) โ€” the classic way an accessible PDF becomes inaccessible.
  5. Verify tags survived. Validate with PDF/A-UA validation (see validating compliance) โ€” confirm it is still tagged.
  6. Check structure and a screen reader. Confirm reading order, headings, and alt text intact โ€” see screen-reader accessibility and WCAG AA.
  7. If tags were lost, remediate. A stripped file needs re-tagging (see remediating via Word), not just re-compression โ€” then compress losslessly.

FAQ

Why would compressing a PDF lose its accessibility tags?
Because some ways of shrinking a PDF discard its structure. A tagged, accessible PDF carries a hidden tag tree (headings, reading order, alt text) that screen readers rely on; gentle optimisation leaves that tree alone, but heavy-handed approaches โ€” flattening the document, or "print to PDF"/rasterizing it to images โ€” strip the tags (and turn text into pixels), leaving a smaller but inaccessible file. So the risk is not compression per se; it is using a method that rebuilds the document and drops the structure. The fix is to compress in ways that touch only the data (streams, images, fonts) and leave the tag tree intact, then verify.
Which compression methods preserve accessibility?
The data-only ones. Lossless optimisation โ€” recompressing content streams more tightly, subsetting fonts, removing unused objects, deduplicating resources โ€” shrinks the file without touching the structure, so tags, reading order, and alt text survive intact. Image compression (downsampling over-resolution images, re-encoding photos at a sensible quality) also keeps the tags, since it changes the images, not the document structure (just keep alt text, which lives in the tags, not the image). What does not preserve accessibility is anything that flattens or rasterizes the document. So favor lossless optimisation plus measured image compression, and avoid flatten/print-to-PDF, to shrink an accessible PDF safely.
Does image compression hurt accessibility?
Not the accessibility, if done right. Alt text โ€” the accessible description of an image โ€” is stored in the document's tags, not inside the image data, so compressing or downsampling the image itself does not remove its alt text; the description stays. What image compression affects is visual quality, so do not over-compress images people need to see clearly. So you can downsample over-resolution images and re-encode photos to shrink the file while keeping both the alt text and acceptable visual quality. Just avoid the mistake of replacing real content with a single flattened image of the page, which would destroy the tags and text.
What is the safe workflow?
Run a lossless optimisation pass first (it shrinks the file with zero structural change), and if you need more, apply measured image compression โ€” both preserve the tag tree. Avoid any "flatten" or "print to PDF" step on an accessible document, since those strip tags. Then verify: confirm the compressed file still has its tags and structure (validate it), and ideally check it with a screen reader. Keep the original as a fallback. So the order is lossless โ†’ measured image compression โ†’ verify accessibility intact, never flatten/rasterize. This gets a smaller file that is still the accessible document you started with.
How do I verify the compressed PDF is still accessible?
Check the structure survived. Confirm the document is still tagged (the tag tree present), the reading order and headings intact, and images still have their alt text, by running an accessibility/PDF-UA validation and ideally testing with a screen reader. A validator flags if tags are missing, which is exactly what a bad compression would have caused. If the validation shows the document is no longer tagged, the compression stripped the structure โ€” go back to the original and use a tags-preserving method. "Smaller and still validates as accessible" is the success condition; do not assume, verify, because the whole point was to keep it accessible.
What if I only have an already-flattened or untagged compressed file?
Then the accessibility was already lost and you need to restore it, not just re-compress. If your only copy is untagged (or an image), you have to make it accessible again: OCR if it is images, then tag it / remediate the structure (often easiest via a remediation workflow), and only then it is an accessible PDF you can compress losslessly. So if compression already stripped the tags, recovering accessibility is a remediation job, not a compression one. The lesson for next time: keep the original tagged PDF and compress it with tags-preserving methods, rather than discovering the tags are gone after the fact.
Is it safe to compress an accessible PDF online?
For confidential documents, prefer a tool that processes files locally. ScoutMyTool runs lossless optimisation and measured image compression in your browser tab without flattening, so a tagged PDF keeps its structure and never leaves your machine; you can then validate it. For anything sensitive, confirm the tool does not upload before using it โ€” and verify the tags survived after compressing.

Citations

  1. Wikipedia โ€” โ€œTagged PDF,โ€ the tag structure that makes a PDF accessible. en.wikipedia.org/wiki/Tagged_PDF
  2. Wikipedia โ€” โ€œPDF/UAโ€ (ISO 14289), the accessibility standard to preserve. en.wikipedia.org/wiki/PDF/UA
  3. Wikipedia โ€” โ€œLossless compression,โ€ the structure-safe way to shrink. en.wikipedia.org/wiki/Lossless_compression

Smaller, and still accessible

Compress losslessly without flattening, then validate, with ScoutMyToolโ€™s in-browser tools โ€” your tagged PDF keeps its structure and never leaves your machine.

Open Compress PDF โ†’