Receipt Generator: Build a Print-Ready PDF in Your Browser
Whether you need a quick receipt for a cash sale, a personal record of a transaction, or a mock receipt for testing an app's PDF rendering, this tool builds an itemized receipt — business details, line items, tax, and discount — and generates a real, downloadable PDF using your browser's own PDF engine.
Subtotal is the sum of quantity × unit price across all line items.
Why the Receipt Is 80mm Wide
The default layout matches the width of a standard 80mm thermal receipt printer roll — the kind used at most retail counters. This makes the PDF a realistic stand-in for testing receipt printing workflows, or simply a familiar, compact format for a quick record.
How Tax and Discount Are Applied
Tax is calculated as a percentage of the subtotal (the sum of every line item's quantity × price) and added on top. The discount is then subtracted as a flat amount from the tax-inclusive total, matching how most point-of-sale systems apply a final discount after tax.
Client-Side PDF Generation
The PDF is built directly with the jsPDF library running in your browser — there's no server rendering step, no file upload, and no account required. The moment you click download, the PDF is generated locally and handed straight to your browser's save dialog.
Practical Examples
A Simple Cafe Receipt
Two items with tax applied.
- 1.Cappuccino x2 @ $4.50 = $9.00
- 2.Croissant x1 @ $3.25 = $3.25
- 3.Subtotal: $12.25
- 4.Tax (8%): $0.98
- 5.Total: $13.23
Applying a Flat Discount
A loyalty discount on a larger order.
- 1.Subtotal: $50.00
- 2.Tax (5%): $2.50
- 3.Discount: -$5.00
- 4.Total: $47.50
What You Can Customize
- Business name and address
- Receipt number and date
- Unlimited line items with quantity and price
- Tax rate and a flat discount
- Currency symbol and a footer note
Good Use Cases
- Quick personal expense records
- Testing PDF/receipt rendering in an app you're building
- Simple point-of-sale receipts for small in-person sales
- Mock data for design or demo purposes
Frequently Asked Questions
Is the PDF generated on a server?
No. The PDF is built entirely in your browser using the jsPDF library — your business details, items, and prices never leave your device.
What size is the receipt?
It's formatted like a classic 80mm thermal receipt printer roll, sized to the number of items you add, which makes it print cleanly on standard receipt paper as well as regular printers.
Can I add a discount?
Yes — enter a flat discount amount and it's subtracted from the subtotal-plus-tax total. For a percentage discount, calculate the amount separately and enter it as a flat value.
How is tax calculated?
Tax is calculated as a percentage of the subtotal (sum of all line item totals) and added before the discount is subtracted.
Can I use this for an official business invoice?
It's designed for a simple itemized receipt, not a full invoice with terms, payment details, and legal business information — check your local tax/business requirements for what an official invoice needs to include.
Does it save my receipt data anywhere?
No. Nothing is stored — refreshing the page resets the form. Download the PDF once you're happy with the details.