pdf2kit / Code to PDF

PDF tool

Code to PDF

Drop a source file or paste a snippet and get a clean PDF with real, selectable text in monospace - not a screenshot. Your code never leaves your device.

Drop or paste code

A source file (.js, .py, .java and more) or a pasted snippet. It opens in the workspace on your device. Nothing is uploaded.

or press CtrlV to paste code

Step by step

How to turn source code into a PDF

Good for a code review, a print-out, a handout, or an archive. There is nothing to install and no sign-up.

1

Drop your code file

Drag a source file onto the workspace, or paste a snippet with Ctrl+V. Most languages work.

2

Check the pages

Your code is laid out in monospace on clean pages, so columns and indentation line up. A page count and preview show first.

3

Add more or arrange

Drop in more files, reorder pages, or add page numbers. Each file becomes its own pages.

4

Download the PDF

Click Download PDF. The code stays selectable and searchable, and the file is small.

Why pdf2kit

Turn code into a PDF without uploading it

Source code and config files can hold secrets and unreleased work. They should not go to a web converter just to become a PDF for a review, a print-out or an archive. pdf2kit builds the PDF on your own device, in monospace with real selectable text, and uploads nothing. It is free, with no account and no watermark.

FAQ

Code to PDF: Common questions

Which languages are supported?

Any text-based source file: JavaScript, Python, Java, C, Go, Rust, HTML, CSS, SQL and more. The type is read from the content, so a wrong extension still works.

Is the code monospaced?

Yes. Code is drawn in a monospace font so indentation and columns line up, the way an editor shows it.

Is the text real, or a picture of the code?

Real, selectable text. You can copy it out of the PDF and search it, and it stays sharp at any zoom.

Is my code uploaded?

No. The PDF is built in the page on your device. Your code never leaves your computer.

Can I paste a snippet instead of a file?

Yes. Copy the code and press Ctrl+V here or in the workspace, and it becomes real text on the page.

More PDF tools

Other things you can do