Code to PDF Converter
Turn source code into a PDF with a monospace font, optional line numbers, and automatic page breaks. The PDF is built in your browser.
1 Paste your text and pick the options
2 Your answer
Press Create PDF and your answer shows here.
How to use the Code to PDF Converter
- Paste your code into the Code box.
- Pick a font size and turn line numbers on or off.
- Set the file name, then click Create PDF to download the file.
Frequently asked questions
Is my code uploaded anywhere?
No. The PDF is built in your browser from the text you paste, and nothing is sent to a server.
Why does the PDF use a monospace font?
A monospace font gives every character the same width, so indentation and columns line up as they do in a code editor.
What happens to lines that are too long for the page?
They are wrapped onto the next row. Wrapped rows do not get a line number, so each source line keeps its original number.
Which characters are not supported?
The built-in Courier font covers basic Latin letters, digits, common symbols and Western accented letters. Other characters, such as emoji or Chinese text, are shown as question marks.
Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.