Drag & drop any source code file here
or click to browse
.js .ts .py .java .go .rs .php .cs .rb .css .html .sql .sh + more
Upload or Paste Code
Upload any source code file or paste code directly
Syntax Highlighting
Language auto-detected, tokens colour-coded (dark/light)
Save as PDF
Click convert and save from the browser print dialog
Supported Languages — click to select
How much did you enjoy Code to PDF Converter?
Related Tools
Not Found
Convert Source Code to PDF Instantly
ToolSnak's Code to PDF Converter lets you turn any source code file into a beautifully styled, syntax-highlighted PDF. Perfect for code reviews, documentation, portfolio submissions, or printing code for interviews. Upload a file or paste directly — language is auto-detected from the file extension.
25+ Supported Programming Languages
JavaScript, TypeScript, JSX, TSX, Python, Java, Go, Rust, C#, C/C++, PHP, Ruby, Swift, Kotlin, Dart, CSS, SCSS, HTML, XML, SQL, Shell/Bash, YAML, TOML, JSON, Markdown, ENV and more. Each language uses accurate keyword sets, string detection, and comment parsing.
Key Features
- 25+ programming languages with accurate syntax highlighting
- Dark (GitHub-style) and Light themes
- Line numbers on every page
- Language badge & colour-coded header bar
- Adjustable font size (6–13pt) and page format (A4, Letter, Legal, A3)
- Portrait and Landscape orientation
- Upload a file or paste code directly
- True vector PDF — text is selectable and searchable
- 100% browser-based, no server upload
How to Use
- Upload a source code file or switch to 'Paste Code' tab and paste your code.
- Select the programming language from the dropdown if needed.
- Choose theme (dark/light), font size, and page format in Settings.
- Click 'Convert to PDF & Download'.
- In the print dialog, select 'Save as PDF' to download.
Use Cases
Code to PDF is ideal for: sharing code snippets in a professional format, printing code for technical interviews, code review documentation, including source code in reports or portfolios, archiving code in a human-readable format, and creating printable cheat sheets.
Got Questions? We have you covered
Support ToolSnak’s Mission
ToolSnak is completely free — no sign-ups, no limits. Enjoy AI writing tools, OCR, and more with zero hassle. Want to help us grow? We love your support. Thank you!