Tools150

A useful PDF task, made simple

Source Code to PDF.

Turn source code into a clear, beautifully formatted PDF. Upload a file or paste your code, choose a theme, and make it ready to share.

Advertisements
Your PDF workspace
Temporary server processing
or drop your files here
Uploaded for syntax previews and PDF creation. Your code is never run. PDF
Advertisements

How to source code to pdf

  1. 01

    Upload or paste your code

    Upload a source file or start writing. Let the app detect the language, or choose it yourself.

  2. 02

    Make it your own

    Choose a theme, highlight important lines and check the live page preview.

  3. 03

    Create a shareable PDF

    Select Start to create your PDF, then download or preview it. Your code remains editable.

BlogHow to turn source code into a readable PDFRead the guide

Source Code to PDF

Turn source code into a downloadable PDF. Upload or paste your content, edit it in the source pane, and choose the font and page layout. Source code is printed as text and is never executed.

Source text, a readable printed document
QUICK VIDEO TUTORIAL How to turn source code into a readable PDF Prepare code for reading, teaching or review. English narration Watch the video

How to turn source code into a readable PDF

Practical ways to use this tool

Students

Submit readable programming work

Create a PDF of Python, Java, C++ or other supported source code and inspect long lines before submission.

Developers

Prepare code-review excerpts

Choose syntax colors and line numbering so reviewers can refer to a precise part of the printed code.

Educators

Print examples for a lesson

Set a readable font and paper layout for classroom handouts while keeping source code as text.

Features and controls

Upload code or paste into the editor

Switch between a readable PDF preview and a full code editor.

Preview and code editing

Upload a supported programming file, paste code or begin typing. Preview is the initial view for an uploaded file; Code keeps your source editable. The editor provides find/replace, regular-expression search, indentation, bracket matching and undo/redo. Copy feedback confirms when code is copied, and source download keeps a plain-text copy.

Choose language and syntax colors

Use automatic language detection or override it, then select a color theme.

Language detection and print styling

Language detection uses the filename and source; choose the correct language manually if highlighting looks wrong. Xcode is the default color scheme. Font family, size, bold, line spacing and tab width control the printed code. The initial document size is 9 pt; the writing editor’s display size is separate from the PDF settings.

Print only the code you need

Choose line ranges, line numbering and highlighted lines.

Ranges, highlights and headers

Select a line range for a shorter handout, retain meaningful line numbering and highlight lines you want readers to notice. Add a document title, author or course, a header and page numbers. Wrapping helps long lines fit the page; if wrapping is disabled and text would be clipped, fix the layout before exporting.

Prepare a readable document

Use paper size, orientation and margins to give your content room.

Paper settings and final review

Choose landscape for wide content or a larger paper size when columns and long lines need more space. Font size and spacing change pagination, while preview zoom only changes the on-screen view. Review the final pages rather than relying on the first page alone. Download the finished PDF before closing the workspace.

Review your finished PDF

Preview the result before downloading and sharing it.

Preview, download and revise

Select Start when the settings are ready. On the result screen, Preview opens the generated PDF and Download saves a separate copy. Back returns to the current workspace; Start over clears it for a new file. Review small text, page edges and page order in the finished copy. A new PDF does not preserve the validity of an existing digital signature.

Supported files & processing

Input
TXT, PY, JS, TS, PHP, C, CPP, H, JAVA, CS, CSS, HTML, JSON, XML, SQL, SH, RB, GO, RS
Output
PDF

Upload a supported text file or paste content, up to 10 MB after decoding. Generated PDFs are limited to 200 pages. Structure, layout and memory limits also apply.

Processing uses our servers. Source files, temporary files and results are deleted from our servers within 30 minutes after processing finishes. We do not share document contents with third parties or use them to train AI models.

Advertisements
FAQ

A few useful answers

Know what to expect before you start.

Temporary server processing
Does the code-to-PDF converter run my program?

No. It prints the source code with syntax highlighting; it does not execute the program. Upload a supported code file or paste text, then use the Code view to edit, find and replace, and download the source separately.

Can I choose syntax highlighting and a print theme?

Language detection uses the filename and source; choose the correct language manually if highlighting looks wrong. Xcode is the default color scheme. Font family, size, bold, line spacing and tab width control the printed code. The initial document size is 9 pt; the writing editor’s display size is separate from the PDF settings.

Can I print only selected lines of code?

Select a line range for a shorter handout, retain meaningful line numbering and highlight lines you want readers to notice. Add a document title, author or course, a header and page numbers. Wrapping helps long lines fit the page; if wrapping is disabled and text would be clipped, fix the layout before exporting.

Which files and sizes are supported?

Supported input: 1P, 3PM, 6PL, 6PM, ABAP, ABNF, ADA, ADB, ADL, ADLF, ADLS, ADLX, ADO, ADS, AES, AGDA, AHEUI, AHK, AHKL, AJ, ALG, ALS, ANS, APL, APLC, APLF, APLI, APLN, APLO, APPLESCRIPT, AREXX, ART, ARW, AS, ASAX, ASC, ASCX, ASHX, ASM, ASMX, ASN1, ASPX, ASY, AT, AU3, AUG, AUTOMOUNT, AUX, AWK, AXD, B, BARE, BAS, BASH, BASHRC, BAT, BB, BBC, BC, BE, BEFUNGE, BF, BIB, BLP, BMX, BNF, BOA, BOO, BPL, BQN, BRO, BST, BUG, BZL, C, C++, C++-OBJDUMP, C-OBJDUMP, CADL, CAMKES, CAPNP, CARBON, CBL, CC, CDDL, CDF, CDL, CEYLON, CF, CFC, CFG, CFM, CFML, CHAI, CHPL, CI, CIRRU, CJS, CL, CLAY, CLJ, CLJC, CLJS, CLS, CMAKE, CMAKELISTS.TXT, CMD, CML, COB, COFFEE, COMAL, CP, CPL, CPP, CPP-OBJDUMP, CPS, CPSA, CPY, CR, CRMSH, CROC, CRY, CS, CSD, CSH, CSS, CSSUL4, CU, CUH, CW, CXX, CXX-OBJDUMP, CYP, CYPHER, D, D-OBJDUMP, DARCSPATCH, DART, DASM, DASM16, DAX, DCL, DECLS, DEF, DESKTOP, DEVICE, DG, DI, DIFF, DMESG, DO, DOCKER, DOCKERFILE, DOT, DPATCH, DPR, DTD, DTS, DTSI, DUBY, DUEL, DYALOG, DYL, DYLAN, DYLAN-CONSOLE, E, EBNF, EBUILD, EC, ECL, ECLASS, EDP, EEX, EG, EH, EL, ELM, ELPI, EML, ENV, EPS, ERL, ERL-SH, ES, ESCRIPT, EVOQUE, EX, EXEC, EXHERES-0, EXLIB, EXPLAIN, EXS, EXW, EZT, F, F03, F90, FACTOR, FAN, FANCYPACK, FC, FEATURE, FHTML, FIF, FISH, FLO, FLX, FLXH, FNL, FRAG, FRT, FS, FSI, FST, FSTI, FSX, FUN, FUNC, FUT, FY, G, GAP, GCODE, GD, GDC, GEMSPEC, GEO, GI, GITIGNORE, GO, GOLO, GRADLE, GRAPH, GRAPHQL, GROOVY, GS, GSP, GSQL, GST, GSX, GV, H, H++, HAML, HANDLEBARS, HBS, HCL, HDP, HH, HLSL, HLSLI, HPP, HRL, HS, HSAIL, HTM, HTML, HTMLUL4, HX, HXML, HXSL, HXX, HY, HYB, I, I6T, I7X, ICL, ICN, ICON, IDC, IDL, IDL4, IDR, IJS, IK, INC, INF, INI, INO, INSTANCES, INTR, IO, IPF, IPYNB, ISA, J, JADE, JAG, JANET, JAVA, JBST, JCL, JDN, JL, JP, JS, JSGF, JSLT, JSM, JSON, JSONL, JSONLD, JSONNET, JSP, JSUL4, JSX, JUTTLE, JY, K, KAL, KID, KIF, KK, KKI, KMSG, KN, KQL, KSH, KT, KTS, KUSTO, LAGDA, LASSO, LCRY, LDIF, LEAN, LEEX, LESS, LGT, LHS, LIBSONNET, LID, LIDR, LIQUID, LISP, LL, LOAD, LOGTALK, LPAD, LS, LSL, LSP, LUA, LUAU, LY, M, M2, MA, MAC, MAK, MAKEFILE, MAN, MAO, MAQL, MARKDOWN, MASK, MAX, MC, MCFUNCTION, MCSCHEMA, MD, MHTML, MI, MIPS, MIR, MJS, MK, ML, MLI, MLL, MLY, MM, MO, MOD, MOJO, MONKEY, MOO, MOON, MOS, MOUNT, MQ4, MQ5, MQH, MS, MSC, MT, MU, MXML, MYT, N, NASM, NB, NBP, NC, NCL, NDJSON, NG2, NI, NIM, NIMROD, NIT, NIX, NL, NQP, NS2, NSH, NSI, NT, OBJDUMP, OBJDUMP-INTEL, ODIN, OOC, OPA, ORC, ORG, P, P6, P6L, P6M, PACK, PAN, PAS, PATCH, PATH, PC, PCMK, PEG, PEM, PERL, PH, PHP, PHTML, PIDL, PIG, PIKE, PL, PL6, PLOT, PLT, PM, PM6, PML, PMOD, PO, PONY, PORTUGOL, POT, POV, PP, PR, PRAAT, PRG, PRM, PRO, PROC, PROLOG, PROM, PROMELA, PROMQL, PROPERTIES, PROTO, PRQL, PS, PS1, PSC, PSI, PSL, PSM1, PTLS, PTX, PUG, PWN, PXD, PXI, PY, PY2TB, PY3TB, PYI, PYPYLOG, PYTB, PYUL4, PYW, PYX, Q, QBS, QML, QVS, QVTO, QVW, R, R3, RAKE, RAKU, RAKUDOC, RAKUMOD, RAKUTEST, RB, RBW, RBX, RD, RE, REACT, REB, RED, REDS, REG, REI, RESOURCE, REST, REX, REXX, RHTML, RIDE, RITA, RKT, RKTD, RKTL, RL, RNC, ROBOT, ROUT, RPF, RQ, RQL, RS, RSL, RSS, RST, RTS, RUN, RVT, RX, S, SAGE, SARL, SAS, SASS, SAVI, SBL, SC, SCAD, SCALA, SCAML, SCD, SCDOC, SCE, SCI, SCM, SCO, SCOPE, SCSS, SED, SERVICE, SGF, SH, SH-SESSION, SHELL-SESSION, SHEN, SHEX, SIEVE, SIG, SIL, SIV, SL, SLA, SLICE, SLIM, SLS, SMALI, SMITHY, SML, SMV, SNBT, SNOBOL, SOCKET, SOL, SP, SPARQL, SPEC, SPICE, SPT, SQL, SQLITE3-CONSOLE, SS, SSP, ST, STAN, SV, SVH, SWAP, SWG, SWIFT, T, TAC, TACT, TAL, TAP, TARGET, TASM, TCL, TCSH, TEA, TEAL, TEX, TF, THRIFT, THY, TI, TID, TIMER, TLB, TMPL, TNT, TOC, TODOTXT, TOML, TPL, TPP, TREETOP, TS, TST, TSX, TT, TTL, TWIG, TXT, TYP, TYPOSCRIPT, U, U1, U2, UDO, UL4, USD, USDA, V, VALA, VAPI, VARK, VB, VBS, VCL, VERT, VHD, VHDL, VIM, VIPGRM, VM, VP, VPR, VY, WAST, WAT, WDIFF, WEBIDL, WEECHATLOG, WGSL, WHILEY, WLUA, WREN, WSDL, WSF, X, X10, XHTML, XI, XM, XMI, XML, XMLUL4, XPL, XPP, XQ, XQL, XQM, XQUERY, XQY, XSD, XSL, XSLT, XTEND, XTM, YAML, YANG, YAR, YML, ZEEK, ZEP, ZIG, ZONE, ZSH, ZSHRC; up to 10 MB per file. Generated PDFs have no fixed page-count or file-size cap. Input and processing limits still apply.

Where is my document processed?

This tool uses our servers for processing. Your original file is not overwritten; the result is a separate download. Preview and review the result where available, and download the copy you need before starting over.

Keep going

What would you like to do next?

Choose a tool. Your finished PDF goes with you.

PDF

Advertisements

Language38

English العربية Français Italiano Deutsch Español Português Nederlands Русский Türkçe 日本語 中文 हिन्दी Bahasa Indonesia Bahasa Melayu 한국어 Tiếng Việt ไทย Polski Svenska Українська Norsk বাংলা Ελληνικά فارسی اردو Čeština Dansk Magyar Română Suomi Български Filipino ქართული Slovenčina Azərbaycanca עברית Slovenščina