PDFkind
Developer docs: Quick start

Get started

Quick start

Copy one script tag and one attribute: files that are too big are reduced in the visitor’s browser before upload, with no change to your upload code.

This page sets up the upload helper. To put a whole tool on your page instead, see Embed a tool.

  1. Add the script

    Paste it once per page, anywhere, for example just before </body>.

    HTML
    <script src="https://pdfkind.com/embed.js" defer></script>
  2. Set the size limit on your upload field

    Use the same limit your server checks. Put the attribute on the file input, or on a drag-and-drop area.

    HTML
    <input type="file" name="diploma" data-pdfkind-max="5MB">
  3. Credit PDFkind

    Add a short visible line near the field. It’s free to use; this link is all we ask.

    HTML
    <p>Large files are reduced in your browser by <a href="https://pdfkind.com/compress-pdf">PDFkind</a>.</p>
  4. Try it

    Pick a PDF or photo bigger than your limit. A small window shows “Reducing your file…”, then your form receives the smaller file. Your existing upload code doesn’t change.

Tip. Using WordPress or a form builder where you can’t add attributes to fields? Put the limit on the script instead: <script src="https://pdfkind.com/embed.js" data-max="5MB" defer></script>. See WordPress & form builders.

Last updated November 3, 2026 · Questions: contact@pdfkind.com