Skip to main content

How to upload a one-time file in the PDF.co API Tester

Find the right upload screen, send a local or Base64-encoded file, and use its temporary link to test a PDF conversion.

Open the PDF.co API Tester. In the left sidebar, scroll to Document, File & System and choose the upload method for your file. If Try it is disabled, click login, sign in to PDF.co, and return to the Tester. When you open a PDF.co request, the Tester fills in your API key.

API Tester navigation showing the small-file, Base64, GET and PUT upload screens, and the Try it button.

Upload a local file up to 100 KB

  1. Click Upload Small File, then Try it.

  2. Under Body, click Drop a file here or click to upload and select your file. To supply a filename, expand the optional field and enter it in name. Click Send.

  3. In the response, copy url. Use it as the input for your next request.

Upload Base64-encoded file contents

  1. Click Upload File Using Base64, then Try it.

  2. Under Body, select Form to show the individual fields. Paste the Base64-encoded contents in file. To supply a filename, click Expand 1 optional field and enter a name such as sample.pdf in name.

  3. Click Send and copy url from the response.

The 4 MB request limit includes the Base64 text and the surrounding JSON. Encoding makes a file larger. If the encoded request is too large, use the two-step upload below.

Upload a larger local file with GET and PUT

  1. Click Generate Pre-signed URL, then Try it. Click Expand 3 optional fields in the query section. Enter your filename in name and set contenttype to application/octet-stream. Click Send.

  2. Save both values from the response. presignedUrl is the destination for the upload. url is the link you will use to open or process the file. At this point GET has created the links. Your file is still on your computer.

  3. Click Upload File via Pre-signed URL, then Try it. Paste the complete presignedUrl, including everything after the question mark, into the presignedUrl field. Under Body, click Drop a file here or click to upload, choose the local file, and click Send. The Tester sends the raw bytes using application/octet-stream. Leave your PDF.co API key out of this storage request.

  4. HTTP 200 with an empty response body means storage accepted the file. To open or process it, use the url you saved from GET. If the signed link expired, repeat GET to obtain a fresh pair.

Signed-in upload forms showing the local file picker, Base64 Form, GET name and contenttype fields, and the PUT file picker.

Use the uploaded PDF in a test

For a PDF containing text, open PDF to Text and click Try it. Under Body, select Form and replace the example in url with the access url from your upload. Click Send. With inline output, read the extracted text in the response’s body field. With file output, open the new url in the conversion response. Look for a phrase from your PDF to confirm you processed your own file.

Reusing the same template or form? Open PDF.co File Storage and use its filetoken:// link for future requests. The Tester routes above provide temporary links for one-time use.

Did this answer your question?