Preserve Indentation
Maintains code structure and spacing.
Maintains code structure and spacing.
Generates readable PDFs using fixed-width fonts.
Files are automatically deleted after 1 hour.
Works directly in your browser.
Uploaded files are used only for processing and are automatically deleted after 1 hour. Avoid uploading files containing passwords, API keys, private credentials, or sensitive personal data.
The output is a standard PDF containing your Python code in a monospaced, fixed-width font that preserves indentation and line structure. It is formatted for readability, not for execution — the PDF cannot be run as code.
Very large.py files with thousands of lines will convert, but the output will span many pages. Extremely large files may take longer to process or produce oversized PDFs. For best results, convert individual script files rather than concatenated codebases.
Yes, indentation and line breaks are preserved as they appear in the source file. However, if your file mixes tabs and spaces inconsistently, the PDF may show alignment that differs from your code editor's display, since tab width rendering can vary.
Non-ASCII characters — such as Unicode symbols, emoji, or characters from non-Latin scripts used in comments or string literals — may not render correctly if the PDF font does not support them. If you see boxes or missing characters, replace those characters in your Python (.py) file with ASCII equivalents before converting.
Your Python (.py) file is used only to generate the PDF and is automatically deleted after 1 hour. Do not upload.py files containing sensitive credentials, API keys, or private logic if you have concerns about file handling — treat any browser-based tool with the same caution you would apply to any online service.