Invoice Generator
Fill in the details, watch the totals update live, download a clean PDF. Exact integer-cents math, discount applied before tax — and nothing ever leaves your device.
Live preview
- Subtotal
- —
- Discount (before tax)
- —
- Tax
- —
- Total due
- —
Drafts autosave to this browser only.
Your data stays on this device. The invoice, your client's details, your logo and the PDF are all built in your browser — no upload, no account, no server copy. A logo you add is embedded into the PDF locally too; the image file is never transmitted anywhere. The draft autosaves to your browser's localStorage so a closed tab does not lose your work; “Clear draft” wipes it.
An invoice builder that never sees your invoices
Most free invoice generators are lead funnels: you type your client list into their server, and the "free PDF" arrives after an email wall, with the vendor's logo stamped on it. This tool is the same job with zero upload — the form, the live totals, the draft autosave and the PDF itself all run as JavaScript on this page, with the PDF assembled in memory by pdf-lib (a pinned MIT library served from this site). Load the page, go offline, and you can still finish and download the invoice. No signup, no watermark, no copy of your billing data anywhere but your machine.
Why the math is done in integer cents
Naive invoice tools compute money in floating point, where 0.1 + 0.2 is 0.30000000000000004 — harmless on one line, but across quantities, discounts and tax it produces invoices that are a cent off, and a cent-off invoice gets rejected by accounts-payable software. This tool never does float arithmetic on money: every amount is an integer count of minor units (cents for USD/EUR, whole yen for JPY), quantities are integer thousandths (2.5 hours is 2500), tax rates are integer basis points (7.25% is 725), and each rounding step is half-up, computed exactly even at billions. A worked example: $10.10 taxed at 7.25% is 1010 × 725 / 10000 = 73.225 cents, which rounds to 73¢ — total $10.83, reproducibly, every time.
Discount before tax — and why the order matters
The discount here is always subtracted from the subtotal before tax, which is how most tax authorities expect it: the customer owes tax only on what they were actually charged. The order can change the total once rounding is involved:
| Order | $9.99, 5% discount, 7.25% tax |
|---|---|
| Discount first (this tool) | 9.99 − 0.50 = 9.49; tax 0.69 → $10.18 |
| Tax first | 9.99 + 0.72 = 10.71; − 0.54 → $10.17 |
With per-line tax rates (a German invoice mixing 7% food and 19% goods, say) a global discount is split across the lines in proportion to their totals using the largest-remainder method, so the per-line parts always add up to exactly the discount shown — no stray cent appears or vanishes. Every one of these rules is pinned by machine-checked golden-vector tests in this site's repository, including a 250,000-unit × $19,999.99 line that stays exact.
Your logo, embedded without re-encoding
Add a PNG or JPEG (up to 2 MB) and it is placed at the top right of the PDF header. Most in-browser tools redraw an uploaded logo onto a canvas and re-encode it, which softens fine linework and small text inside the logo; this tool embeds your original file bytes directly into the PDF's image stream, so what you picked is exactly what prints — PNG transparency included. The image is fitted into a 170 × 60 point header box with its aspect ratio preserved: a wide 1000 × 300 px logo comes out 170 × 51 points, a tall one is height-limited, and a logo already smaller than the box keeps its natural size, because enlarging a bitmap only makes it blurry. The file type is checked by its actual bytes, not its filename. SVG is not accepted — PDFs embed raster PNG/JPEG streams — so export a vector logo as a high-resolution PNG (say 600 px wide) first.
Currencies: one per invoice, decimals done right
The currency menu drives real formatting through your browser's Intl.NumberFormat, which knows that USD and EUR carry 2 decimals while Japanese yen and Korean won carry none — pick JPY and the tool works in whole yen, rejects ¥1500.5 as unrepresentable instead of silently rounding it, and prints ¥4,179 rather than ¥4,179.00. What it deliberately does not do is convert between currencies: any bundled exchange-rate table would be stale the day it shipped, so an invoice is single-currency and conversion is your bank's job.
Honest limits
This is an invoice generator, not an accounting system: it does not number invoices sequentially for you, track payments, or store anything beyond one autosaved draft in your browser's localStorage (the "Clear draft" button wipes it). The PDF uses the built-in Helvetica font, so it stays a few KB but covers only Western European characters — Cyrillic, CJK and symbols like ₹ become ? in the PDF (amounts are safe: the PDF writes ISO codes such as INR 1,234.56). And a PDF may not satisfy your jurisdiction's invoicing law — EU VAT invoices need both parties' VAT IDs and specific wording, and some countries mandate structured e-invoices. Check with your accountant; this tool gives you the correct arithmetic and a clean document, not legal advice.