Invoice Generator
Invoice Generator builds professional invoices entirely in your browser — business and client details, line items, tax/VAT, discounts in 26 currencies, your logo, and a one-click PDF download. Drafts are saved in your browser only; no invoice data is ever uploaded anywhere.
How does a browser-native invoice generator work?
An invoice is a structured commercial document with a surprisingly strict anatomy. Across the EU, UK, US and most other jurisdictions, a valid invoice must identify the seller and the buyer, carry a unique sequential number, state an issue date (and usually a payment due date), itemize what was sold with quantities and unit prices, show any discounts, state the tax rate applied and the tax amount, and present a grand total. Miss any of these and the document can be rejected by a client's accounts-payable department — or worse, by a tax auditor. A browser-native generator encodes all of these rules as client-side logic: the form you fill in is the data model, the live preview is a direct rendering of that model, and the PDF export serializes the same model with a layout engine (pdf-lib) running entirely inside the page.
The invoice math: subtotal, discounts, taxable base, total
Every line item contributes quantity × rate to the subtotal. The order of operations after that is not arbitrary — it follows commercial convention:
- Subtotal — the sum of all line amounts, each rounded to two decimals.
- Discount — either a percentage of the subtotal or a fixed money amount. A fixed discount is capped at the subtotal so the invoice can never total a negative amount.
- Taxable base — subtotal minus discount. This is the figure tax is levied on, matching standard VAT/GST practice worldwide.
- Tax amount — the taxable base multiplied by the tax/VAT rate (0–100%).
- Total due — taxable base plus tax amount.
Rounding deserves a note: money is kept at full floating-point precision through every intermediate step and rounded to two decimals only when a line amount or total is finalized. Rounding each intermediate value (a common bug in naive implementations) lets multi-line invoices with fractional tax rates drift by a cent — small, but exactly the kind of discrepancy that makes accountants distrust a tool.
Currency formatting across 26 currencies
Formatting money correctly is a localization problem, not just a symbol problem. The US writes $1,234.50; Germany writes 1.234,56 €; Japan's yen has no minor unit at all (¥1,500, never ¥1,500.00); India groups digits in lakhs and crores (₹1,23,456). The generator delegates this toIntl.NumberFormat with a locale paired to each currency, so every amount — in the live preview and in the exported PDF — follows the typographic conventions your client expects. The PDF export reuses the exact same formatted strings, which guarantees the preview and the document agree to the character.
PDF generation with pdf-lib, fully offline
The PDF is assembled with pdf-lib, a pure-JavaScript PDF writer. The document is an A4 page (595 × 842 points) drawn programmatically: a header block with the invoice number and dates, a two-column “From” / “Bill to” section, a ruled line-items table with description, quantity, rate and amount columns, a right-aligned totals block (subtotal, discount, tax, total due), an optional notes section for payment terms, and a footer noting the document was generated locally. If you upload a logo (PNG, JPG or WebP under 2 MB), its bytes are embedded directly into the PDF — the file is self-contained with no external image references that could break when the client opens it offline. Fonts are the PDF standard fourteen (Helvetica / Helvetica-Bold), which every PDF reader renders without embedding font files.
Privacy architecture: why “no server” matters for invoices
Most online invoice tools are SaaS products: your client list, your rates and your revenue live in someone else's database, governed by someone else's security practices and breach history. Invoices concentrate exactly the data identity thieves and competitors want — who you work for and what you charge them. A client-side-only generator inverts this: form state lives in React memory, drafts persist to localStorage (a per-browser, per-device store no website operator can read), and the PDF bytes are produced by JavaScript in the tab and handed to the browser's download manager. There is no upload endpoint to misconfigure, no database to breach, and no subprocessors. The privacy claim isn't a policy paragraph — it's the absence of any code path that could send the data anywhere.
Invoice numbering, dates and professional practice
Tax authorities in most countries require invoice numbers to be sequential with no gaps, because gaps look like hidden income. The generator proposes numbers like INV-20261009-4821(date plus a random suffix to prevent collisions when you create several invoices a day), but any scheme works — 2026-001, 2026-002 is the classic. The due date defaults to 14 days after the issue date, the most common freelance payment term; 30 days is standard for larger B2B contracts and can be typed in directly. The notes field is the right place for bank details, late-payment terms (“1.5% per month after the due date” is enforceable in many jurisdictions when stated on the invoice), and your tax registration number where required.
Which keyboard shortcuts does the invoice generator support?
Frequently asked questions
Is my invoice data sent to a server?
No. The entire invoice — your business details, client names, line items, rates and totals — lives only in your browser's memory and, if you click “Save draft”, in your browser's own localStorage. The PDF is rendered locally with pdf-lib running in the page. There is no account, no backend, and no network request carrying your data anywhere. This is a deliberate architectural choice: invoices contain the most sensitive data a freelancer handles (client identities, rates, tax IDs), and a client-side-only generator is the only design that cannot leak it.
How is tax / VAT calculated — before or after the discount?
Discounts are applied first, then tax is computed on the discounted (taxable) base — which matches standard practice in the EU, UK and US: subtotal minus discount equals the taxable base, and VAT/sales tax is charged on that base. A percentage discount takes a cut of the subtotal; a fixed-amount discount subtracts a money value (capped at the subtotal so the total can never go negative). The tax rate field accepts 0–100% and the math rounds to two decimals only at the final step, so multi-line invoices with fractional rates don't drift by a cent.
Which currencies are supported, and how is formatting handled?
26 currencies are supported, including USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, INR, BRL, MXN and KRW. Amounts are formatted with Intl.NumberFormat using the locale conventionally paired with each currency — so EUR renders as 1.234,56 € (German grouping), JPY renders without decimals (¥1,500, since the yen has no minor unit), and INR uses lakh/crore digit grouping (₹1,23,456). The PDF export uses the same formatted strings, so what you see in the preview is exactly what the client receives.
Can I add my logo and customize the invoice?
Yes. Upload a PNG, JPG or WebP logo (up to 2 MB) and it is embedded directly into the PDF — no external image hosting, so the invoice file is fully self-contained. You can set your business name, address and email, the client's details, a custom invoice number, issue and due dates (due defaults to 14 days after issue), line items with quantities and rates, tax/VAT percentage, percentage or fixed discounts, and free-text notes for payment terms or bank details. Drafts persist in your browser so you can resume later.
Is a PDF generated this way a legally valid invoice?
In most jurisdictions, what makes an invoice valid is its content — seller and buyer identity, a unique invoice number, issue date, a line-by-line description of goods or services, quantities, unit prices, the tax rate applied and the total — not the software that produced it. This generator covers all of those fields. That said, tax rules differ by country (sequential numbering requirements, mandatory VAT registration numbers, e-invoicing mandates such as the EU's ViDA rollout), so treat the output as a professional starting point and confirm local requirements with an accountant for your first invoices in a new jurisdiction.
How do I number my invoices?
Use a sequential, gap-free scheme — most tax authorities require it. The generator suggests numbers like INV-20261009-4821 (date plus a random suffix to avoid collisions), but you can type any scheme you prefer, such as 2026-001, 2026-002. Never reuse or skip numbers: auditors read gaps as a red flag. If you void an invoice, keep its number marked “void” rather than deleting it from your sequence.