Code to PDF Converter
Convert source code files (Python, JS/TS, C++, Rust, Go, Java, SQL, HTML, CSS, JSON) into syntax-highlighted PDF documents with line numbers and custom themes in your browser.
- Code
How to use this tool
Paste your code into the editor or drag and drop a source file (.py, .ts, .js, .cpp, .rs, .go, .java, .sql, .html, .css, .json, .txt).
Select your programming language (auto-detected when uploading a file) and specify an optional header filename.
Pick your preferred color theme (One Dark, GitHub Light, or Dracula), adjust font size (10pt, 12pt, or 14pt), and toggle line numbers.
Click Generate PDF to instantly compile and download your vector PDF document.
Frequently asked questions
Quick answers about file privacy, processing modes, formats, and device support.
Related tools
JSON Formatter, Validator & Minifier
Format, validate, minify, and inspect JSON payloads with real-time syntax checking, custom indentation, and key sorting. 100% private in-browser tool.
Base64 Encoder & Decoder
Encode and decode text, JSON, and files to and from Base64. Supports UTF-8 Unicode, URL-safe Base64, and image Data URIs with zero network transfer.
Compress PDF Online
Reduce a PDF’s file size with balanced, high, or best-quality settings. Processing runs on the Elixuvo API for this request only — files are not stored permanently.
Password Protect PDF
Encrypt a PDF with a password using AES-256, then download the protected file. Processing runs on the Elixuvo API in memory — files and passwords are not stored permanently.