A SMALL TOOL WITH A CLEAR JOB

Make code easier to keep.

A source file is good for editing. A well-laid-out PDF is useful when you want to read, review or share it somewhere else.

What JS to PDF does

JS to PDF turns JavaScript, JSX, TypeScript and TSX source files into searchable PDF documents. It preserves source order and comments, adds readable syntax colors, wraps long lines and keeps page numbers and source line numbers in their places.

Code review, reference archives, shared documentation and study notes are all good reasons to keep a PDF. The tool is designed around the task rather than a particular profession or audience.

Designed around the file

Choose a file on your phone or computer. The default layout is generated automatically, with preview and customization available when you need them. Pasting code is an alternative input method. There is no account or watermark.

What happens in your browser

Source code is processed locally using Prism syntax highlighting and jsPDF text output. The preview uses PDF.js, and optional formatting uses Prettier. Fonts are self-hosted and embedded in the PDF. JavaScript source is treated as text and is never executed.

Read the privacy information for details about local processing and hosting requests, or follow the step-by-step guide to make your first document.