PDF Unlocker

No downloads or installation required!

Remove password protection from a PDF using our free online app or learn how it works with our embedded iText 8 Sandbox.


Use the free online PDF Unlocker app

Click the box below to upload a PDF, or drag and drop a PDF into the box.

You will then be asked to enter the Owner Password for the PDF.

Click Unlock PDF and then download the resulting PDF.

Or play in the iText 8 Sandbox

In this Sandbox you can see how the the unlocking code works in iText 8, and experiment with changing the code yourself.

Click Upload File and make sure the file name of the PDF you upload matches the name you specify in private static final String ORIG and that the PDF is password protected. Then enter the password in private static final byte[] OWNERPASS.

Then click Execute to run your code. To remove an uploaded file, click the x displayed next to the file name.

You can click the switch at the top of the Sandbox to change between the embedded Java and C# compiler.

import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.pdf.ReaderProperties; import java.io.IOException; public class PDFUnlocker { private static final String ORIG = "/uploads/unlock.pdf"; private static final String OUTPUT_FOLDER = "/myfiles/"; private static final byte[] OWNERPASS = "owner".getBytes(); public static void main(String[] args) throws IOException { ReaderProperties readerProperties = new ReaderProperties().setPassword(OWNERPASS); PdfReader pdfReader = new PdfReader(ORIG, readerProperties); PdfDocument pdfDocument = new PdfDocument(pdfReader, new PdfWriter(OUTPUT_FOLDER + "Unlocked.pdf")); pdfDocument.close(); } }
using iText.Kernel.Pdf; namespace PDFUnlocker { public class PDFUnlocker { private static string ORIG = "/uploads/unlock.pdf"; private static string OUTPUT_FOLDER = "/myfiles/"; private static byte[] OWNERPASS = System.Text.Encoding.Default.GetBytes("owner"); public static void Main(string[] args) { ReaderProperties readerProperties = new ReaderProperties().SetPassword(OWNERPASS); PdfReader pdfReader = new PdfReader(ORIG, readerProperties); PdfDocument pdfDocument = new PdfDocument(pdfReader, new PdfWriter(OUTPUT_FOLDER + "Unlocked.pdf")); pdfDocument.Close(); } } }
Disclaimer:

iText does not analyze the content of your uploaded or processed files. Users bear sole responsibility for the usage and content of their own files. All uploaded and processed files are deleted from our servers after users leave the page, or automatically after a period of 3 hours.



Contact

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now